This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/81468] New: is_constructible gives the wrong answer for time_point construction


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81468

            Bug ID: 81468
           Summary: is_constructible gives the wrong answer for time_point
                    construction
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: howard.hinnant at gmail dot com
  Target Milestone: ---

This should compile, but does not:

#include <chrono>
#include <type_traits>

template <class Duration>
    using sys_time = std::chrono::time_point<std::chrono::system_clock,
Duration>;

int
main()
{
    using namespace std;
    using namespace std::chrono;
    static_assert(!is_constructible<sys_time<seconds>,
sys_time<milliseconds>>{}, "");
//    sys_time<seconds> s{sys_time<milliseconds>{123ms}};
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]