Index: libcxx/include/__chrono/duration.h =================================================================== --- libcxx/include/__chrono/duration.h +++ libcxx/include/__chrono/duration.h @@ -251,7 +251,7 @@ explicit duration(const _Rep2& __r, typename enable_if < - is_convertible<_Rep2, rep>::value && + is_convertible::value && (treat_as_floating_point::value || !treat_as_floating_point<_Rep2>::value) >::type* = nullptr) Index: libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp =================================================================== --- libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp +++ libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp @@ -39,5 +39,14 @@ test > >(Rep(3)); test > >(5.5); - return 0; + // test for [time.duration.cons]/1 + struct NotValueConvertible { + operator int() const&& noexcept = delete; + operator int() const& noexcept { return 1; } + }; + const NotValueConvertible& NVC = {}; + + test >(NVC); + + return 0; }