Can this function throw an exception ?
No, it cannot.
Per paragraph 20.11.7/1 of the C++11 Standard, system_clock
must satisfy the TrivialClock
requirements.
Moreover, per paragraph 20.11.3/4, the now()
member function of clocks that satisfy the TrivialClock
requirement shall not throw:
A type
TC
meets theTrivialClock
requirements if:[...]
— the function
TC::now()
does not throw exceptions, and[...]