2016-01-11 22:24 GMT+01:00 dyp <
dyp...@gmx.net>:
> CWG 1228 contains the following example:
>
> struct MyList {
> explicit MyStore(int initialCapacity);
> };
>
> struct MyInt {
> MyInt(int i);
> };
>
> struct Printer {
> void operator()(MyStore const& s);
> void operator()(MyInt const& i);
> };
>
> void f() {
> Printer p;
> p({23});
> }
>
> Unfortunately, CWG's response to the issue does not say how this example
> shall be interpreted. From what I understand, [over.match.list] does
> consider explicit constructors viable for overload resolution, but makes
> the program ill-formed if the final overload result contains an explicit
> constructor called by copy-list-init. In the context of the above
> example, this should lead to an ambiguity.
>
> Is this interpretation correct?
>
Yes this is correct. See