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 // template <class Rep1, class Period, class Rep2>
15 // duration<typename common_type<Rep1, Rep2>::type, Period>
16 // operator/(const duration<Rep1, Period>& d, const Rep2& s);
21 #include "test_macros.h"
22 #include "../../rep.h"
27 typedef std::chrono::nanoseconds Dur
;
29 ASSERT_SAME_TYPE(Dur
, decltype(ns
/ 5));
31 assert(ns
.count() == 3);
33 #if TEST_STD_VER >= 11
35 constexpr std::chrono::nanoseconds
ns(15);
36 constexpr std::chrono::nanoseconds ns2
= ns
/ 5;
37 static_assert(ns2
.count() == 3, "");
41 #if TEST_STD_VER >= 11
43 typedef std::chrono::nanoseconds Duration
;
46 ASSERT_SAME_TYPE(Duration
, decltype(d
/ n
));
48 assert(d
.count() == 5);