Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > de.comp.lang.iso-c++ > #2088
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Newsgroups | de.comp.lang.iso-c++ |
| Subject | Re: std::tuple C++11 Frage |
| Date | 2018-08-31 01:05 +0000 |
| Organization | Stefan Ram |
| Message-ID | <tuple-list-20180831020156@ram.dialup.fu-berlin.de> (permalink) |
| References | <pm90i3$snh$1@news.albasani.net> |
Markus Donath <nntp@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 )};
.
Back to de.comp.lang.iso-c++ | Previous | Next — Previous in thread | Next in thread | Find similar
std::tuple C++11 Frage Markus Donath <nntp@online.de> - 2018-08-30 16:56 +0200
Re: std::tuple C++11 Frage ram@zedat.fu-berlin.de (Stefan Ram) - 2018-08-31 01:05 +0000
Re: std::tuple C++11 Frage ram@zedat.fu-berlin.de (Stefan Ram) - 2018-08-31 18:06 +0000
Re: std::tuple C++11 Frage Markus Donath <nntp@online.de> - 2018-09-13 11:17 +0200
csiph-web