Re: Should std::byte copy-list-initialization fail?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 July 2017 at 09:15, Jeffrey Walton wrote:
> The comments explain my confusion. It seemed like both should succeed,
> or both should fail.

No, because there's no implicit conversion. This is consistent with
'explicit' constructors:

struct S {
    explicit S(int) { }
};

S s = { 0 }; // error
S s{ 0 };  // ok

> It looks like special accommodations were made
> for list-initialization under C++17.

Yes, see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0138r2.pdf



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux