//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // 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() { test >(5); test > >(5); test > >(Rep(3)); test > >(5.5); }