https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96926

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
So, for the second example, the compiler's process is

test() initializes the tuple member
looks for tuple(Test) ctor
considers tuple(tuple&&)
looks for conversion from Test to tuple
considers _ImplicitCtor
instantiates __is_implicitly_constructible
instantiates is_constructible<DependsOnT<Test>, const DependsOnT<Test>&>
considers DependsOnT(Test&)
tries to convert to Test
lazily declares Test copy ctor
looks for tuple(tuple) ctor
considers _ExplicitCtor
instantiates __is_explicitly_constructible
instantiates is_constructible<DependsOnT<Test>, const DependsOnT<Test>&>
fails

So, another problem with trying unsuitable candidates when declaring a copy
constructor.  I wonder what rule other compilers are using to break this
recursive dependency.  I'm going to try something that zygoloid suggested GCC
already did: if we see a non-template perfect match, don't consider any
templates.

Reply via email to