Conversion Chrono and Doxygen Flashcards
1
Q
How does a stream return as a boolean?
A
An explicit operator
2
Q
What is an explicit operator?
A
A user-defined conversion function, use it to define conversion to specific data type.
3
Q
Between operators and conversion functions, which takes priority?
A
operators.
4
Q
What is the explicit keyword?
A
It prevents data conversion. Ex: if a function requires a double, but an int is provided, it will not convert.
5
Q
Why does the operator take precedent over conversion function
A
Because it is fewer steps.
Ex: object + int, it is easier to return the operator overload than convert object to an int and then do the math
6
Q
Which library contains the timekeeping methods?
A
<chrono>
7
Q
PLACEHOLDER FOR MORE TIME NOTES
A
8
Q
A