On Mon, Jan 30, 2017 at 9:36 PM Jonathan Wakely <jwak...@redhat.com> wrote:
>
> On 30/01/17 13:28 +0000, Jonathan Wakely wrote:
> >On 30/01/17 13:47 +0200, Ville Voutilainen wrote:
> >>Tested on Linux-x64.
> >
> >OK, thanks.
>
> To be clear: this isn't approved by LWG yet, but I think we can be a
> bit adventurous with deduction guides and add them for experimental
> C++17 features. Getting more usage experience before we standardise
> these things will be good, and deduction guides are very new and
> untried. If we find problems we can remove them again, and will have
> invaluable feedback for the standards committee.
>

My brain compiler says that this may cause problems with

std::optional<int> o1;
std::optional o2 = o1; // wanted optional<int>, deduced optional<optional<int>>

Trunk GCC deduces optional<int>, but I don't think it implements
P0512R0 yet, which prefers explicit guides to implicit ones before
considering partial ordering. This example is very similar to the
example in https://timsong-cpp.github.io/cppwp/over.match.best#1.6.

Tim

Reply via email to