c++ - Should std::chrono::steady_clock::now be noexcept? -
i've noticed std::chrono::steady_clock::now has noexcept specifier in documentation @ cplusplus.com. however, haven't found provision in latest c++11 draft (unfortunately don't have copy of standard).
is mistake in cplusplus.com documenation or should std::chrono::steady_clock::now have noexcept specifier?
§ 20.11.7.2 of c++11 standard's definition of steady_clock:
class steady_clock { public: typedef unspecified rep; typedef ratio<unspecified , unspecified > period; typedef chrono::duration<rep, period> duration; typedef chrono::time_point<unspecified, duration> time_point; static const bool is_steady = true; static time_point now() noexcept; }; so yes, std::steady_clock::now() should noexcept , isn't error in documentation. it seems cppreference says same.
Comments
Post a Comment