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 // constexpr duration& operator++(); // constexpr in C++17
18 #include "test_macros.h"
21 constexpr bool test_constexpr()
23 std::chrono::hours
h(3);
24 return (++h
).count() == 4;
31 std::chrono::hours
h(3);
32 std::chrono::hours
& href
= ++h
;
34 assert(h
.count() == 4);
38 static_assert(test_constexpr(), "");