//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // duration // template // explicit duration(const Rep2& r); #include #include #include "test_macros.h" #include "../../rep.h" template void test(R r) { D d(r); assert(d.count() == r); #if TEST_STD_VER >= 11 constexpr D d2(R(2)); static_assert(d2.count() == 2, ""); #endif } int main(int, char**) { test >(5); test > >(5); test > >(Rep(3)); test > >(5.5); return 0; }