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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -