Skip to content
Unverified Commit 66c19167 authored by Botond István Hprváth's avatar Botond István Hprváth Committed by GitHub
Browse files

[clang] Choose non-templated ctor as deduction guide unambiguously (#66487)

If there are two guides, one of them generated from a non-templated
constructor
and the other from a templated constructor, then the standard gives
priority to
the first. Clang detected ambiguity before, now the correct guide is
chosen.
The correct behavior is described in this paper:
http://wg21.link/P0620R0

Example for the bug: http://godbolt.org/z/ee3e9qG78

As an unrelated minor change, fix the issue
https://github.com/llvm/llvm-project/issues/64020

,
which could've led to incorrect behavior if further development inserted
code after a call to
`isAddressSpaceSubsetOf()`, which specified the two parameters in the
wrong order.

---------

Co-authored-by: default avatarhobois <horvath.botond.istvan@gmial.com>
parent 19141c41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment