C++ named requirements: TrivialClock (since C++11)
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
C++ named requirements
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++20)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++14)
(C++14)
(C++11)
(C++11)
(C++17)
(C++14)
(C++20)
(C++20)
(C++23)
(C++23)
(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
TrivialClock
(C++11)
The TrivialClock requirements describe the requirements satisfied by several clocks in the chrono library.
[edit] Requirements
For a type TC:
- The type must meet Clock requirements.
- The types TC::rep, TC::duration, and TC::time_point satisfy the requirements of EqualityComparable, LessThanComparable , DefaultConstructible, CopyConstructible, CopyAssignable, Destructible (until C++17), Swappable, and NumericType.
- The function TC::now() does not throw exceptions.
- The type TC::time_point::clock meets the TrivialClock requirements, recursively.
[edit] Standard library
The following types in the standard library satisfy TrivialClock requirements: