[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.duration / time.duration.arithmetic / op_++int.pass.cpp
blob084819af3ce8f8eac80330cdb47e0003eb954f9a
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++(int); // 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 h1(3);
24 std::chrono::hours h2 = h1++;
25 return h1.count() == 4 && h2.count() == 3;
27 #endif
29 int main(int, char**)
32 std::chrono::hours h1(3);
33 std::chrono::hours h2 = h1++;
34 assert(h1.count() == 4);
35 assert(h2.count() == 3);
38 #if TEST_STD_VER > 14
39 static_assert(test_constexpr(), "");
40 #endif
42 return 0;