Markus Donath <
nn...@online.de> writes:
>std::list<std::tuple<int, int, int>> tpl {
> { 1, 1, 1 },
In n4296 (2014-11-19) war der Paar-Konstruktor nicht-explizit
(n4296, 20.3.2, »constexpr pair(const T1& x, const T2& y);«),
während der Tupel-Konstruktor explizit war
(n4296, 20.4.2.1, »constexpr explicit tuple(const Types&...);«),
und zur Umwandlung der Einträge einer Initialisierungsliste
wird ein nicht-expliziter Konstruktor benötigt
(nur mit gcc ausprobiert, keine Quelle dafür gefunden).
In n4762 (2018-07-07) ist der Tupel-Konstruktor (n4762, 19.5.3.1p6
»explicit(see below) constexpr tuple(const Types&...);«) nur noch
explizit wenn
»!conjunction_v<is_convertible<const Types&, Types>...>« (p8),
was für »int«s wohl »false« ist.
Alternative:
|::std::list< ::std::tuple< int, int, int >>tlist
|{ ::std::make_tuple( 1, 1, 1 )};
.