http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49151
Summary: [C++0x] chrono::duration has incorrect non-member operator semantics Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: daniel.krueg...@googlemail.com This entry is a reminder for the need to synchronize the library with the accepted LWG issue 2020, http://lwg.github.com/issues/lwg-defects.html#2020 The observable behaviour is that the following test code is rejected by gcc 4.7.0 20110521 (experimental) in C++0x mode at the line marked with #: //---- #include <chrono> constexpr std::chrono::milliseconds ms{}; constexpr auto res = ms + ms; // # //---- "error: 'typename std::common_type<std::chrono::duration<_Rep1, _Period1>, std::chrono::duration<_Rep2, _Period2> >::type std::chrono::operator+(const std::chrono::duration<_Rep1, _Period1>&, const std::chrono::duration<_Rep2, _Period2>&) [with _Rep1 = long long int, _Period1 = std::ratio<1ll, 1000ll>, _Rep2 = long long int, _Period2 = std::ratio<1ll, 1000ll>, typename std::common_type<std::chrono::duration<_Rep1, _Period1>, std::chrono::duration<_Rep2, _Period2> >::type = std::chrono::duration<long long in"