1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 // duration& operator%=(const rep& rhs)
18 #include "test_macros.h"
22 typedef std::chrono::seconds Duration
;
23 Duration
operator%=(Duration d
, NotARep
) { return d
; }
26 constexpr bool test_constexpr()
28 std::chrono::seconds
s(11);
30 return s
.count() == 2;
37 std::chrono::microseconds
us(11);
39 assert(us
.count() == 2);
43 static_assert(test_constexpr(), "");
46 #if TEST_STD_VER >= 11
51 assert(d
.count() == 5);