-
Carsten Gräser authored
This fails to compile if you cannot instanciate the default constructor T. The problem showed up with a std::tuple<T> where T is not default constructible. This is a really nasty issue: std::tuple<T> implements a default constructor but instanciating this fails in this case. As a consequence std::is_constructible<std::tuple<T>> is true, but trying to instanciate it gives a compile error. Similar behaviour can be observed with operator<. At least for the default constructor of std::tuple this seems to be fixed in C++17 by removing it from the overload set if you can't instanciate one for T.
Carsten Gräser authoredThis fails to compile if you cannot instanciate the default constructor T. The problem showed up with a std::tuple<T> where T is not default constructible. This is a really nasty issue: std::tuple<T> implements a default constructor but instanciating this fails in this case. As a consequence std::is_constructible<std::tuple<T>> is true, but trying to instanciate it gives a compile error. Similar behaviour can be observed with operator<. At least for the default constructor of std::tuple this seems to be fixed in C++17 by removing it from the overload set if you can't instanciate one for T.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.