Skip to content

Commit 895e4cf

Browse files
[libc++][test] Fix-up verifying test for is_clock(_v)
This fixes incompleteness and inconsistency for a test file added in adc7932, by - renaming `trait.is.clock.compile.verify.cpp` to `trait.is.clock.verify.cpp`, and - adding comments clarifying what are being tested.
1 parent f8e9b89 commit 895e4cf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libcxx/test/libcxx/time/time.traits.is.clock/trait.is.clock.compile.verify.cpp renamed to libcxx/test/libcxx/time/time.traits.is.clock/trait.is.clock.verify.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88

99
// REQUIRES: std-at-least-c++20
1010

11+
// <chrono>
12+
//
13+
// template<class T> struct is_clock;
14+
// template<class T> constexpr bool is_clock_v = is_clock<T>::value;
15+
16+
// [time.traits.is.clock]/3:
17+
// The behavior of a program that adds specializations for is_clock is undefined.
18+
19+
// [namespace.std]/3:
20+
// The behavior of a C++ program is undefined if it declares an explicit or partial specialization of any standard
21+
// library variable template, except where explicitly permitted by the specification of that variable template.
22+
1123
#include <chrono>
1224
#include <ratio>
1325

0 commit comments

Comments
 (0)