//===----------------------------------------------------------------------===// // // 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 "../../rep.h" template void test(R r) { D d(r); assert(d.count() == r); #ifndef _LIBCPP_HAS_NO_CONSTEXPR constexpr D d2(R(2)); static_assert(d2.count() == 2, ""); #endif } int main() { test >(5); test > >(5); test > >(Rep(3)); test > >(5.5); }