Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #88038
| From | Muttley@dastardlyhq.com |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: initializer_list constructor implementation |
| Date | 2022-12-19 09:59 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tnpcl6$580$1@gioia.aioe.org> (permalink) |
| References | <5318cc4c-fd12-434d-aa3e-6e4f361241e2n@googlegroups.com> <k08c43Fh735U1@mid.individual.net> <0aeb40fa-6829-4123-94bc-ed718dee6814n@googlegroups.com> <k0aqcqFs99vU1@mid.individual.net> |
On Mon, 19 Dec 2022 10:49:14 +0100 Bo Persson <bo@bo-persson.se> wrote: >On 2022-12-18 at 21:40, Pawel Por wrote: >>> std::initializer_list is "magic" in that the compiler knows about it and >>> its connection to brace initializers. >>> >>> Your class lacks this compiler magic, so works differently (=not supported). > >> >> Thank you for response. Is this "magic" somehow available for the users or >totally hidden. If so, how can I use it ? > >I think it is just triggered by the name std::initializer_list. So not >really available for user code. A bit like printf() is usually a compiler built-in which means it can give warnings about mismatched format specifiers and parameter types, which it won't do with user written vararg functions.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
initializer_list constructor implementation Pawel Por <porparek@gmail.com> - 2022-12-18 02:13 -0800
Re: initializer_list constructor implementation Bo Persson <bo@bo-persson.se> - 2022-12-18 12:33 +0100
Re: initializer_list constructor implementation Pawel Por <porparek@gmail.com> - 2022-12-18 12:40 -0800
Re: initializer_list constructor implementation Bo Persson <bo@bo-persson.se> - 2022-12-19 10:49 +0100
Re: initializer_list constructor implementation Muttley@dastardlyhq.com - 2022-12-19 09:59 +0000
csiph-web