[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.duration / time.duration.arithmetic / op_divide=.pass.cpp
blob64b08a86beb1c85f7700a2bb07a08d5ae4d9659c
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 // duration& operator/=(const rep& rhs);
15 #include <chrono>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "../../rep.h"
21 #if TEST_STD_VER > 14
22 constexpr bool test_constexpr()
24 std::chrono::seconds s(15);
25 s /= 5;
26 return s.count() == 3;
28 #endif
30 int main(int, char**)
33 std::chrono::nanoseconds ns(15);
34 ns /= 5;
35 assert(ns.count() == 3);
38 #if TEST_STD_VER > 14
39 static_assert(test_constexpr(), "");
40 #endif
42 #if TEST_STD_VER >= 11
43 { // This is PR#41130
44 std::chrono::nanoseconds d(5);
45 NotARep n;
46 d /= n;
47 assert(d.count() == 5);
49 #endif
51 return 0;