[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.duration / time.duration.arithmetic / op_--.pass.cpp
blobcfdb7075b3732927d82b02ccdc82fc9be7b78c78
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // <chrono>
11 // duration
13 // constexpr duration& operator--(); // constexpr in C++17
15 #include <chrono>
16 #include <cassert>
18 #include "test_macros.h"
20 #if TEST_STD_VER > 14
21 constexpr bool test_constexpr()
23 std::chrono::hours h(3);
24 return (--h).count() == 2;
26 #endif
28 int main(int, char**)
31 std::chrono::hours h(3);
32 std::chrono::hours& href = --h;
33 assert(&href == &h);
34 assert(h.count() == 2);
37 #if TEST_STD_VER > 14
38 static_assert(test_constexpr(), "");
39 #endif
41 return 0;