Issue 134613
Summary Clang 20 implicit CTAD regression?
Labels clang
Assignees
Reporter ngladitz
    ```C++
#include <type_traits>

template<typename R>
struct Foo
{
	using value_type = R ;

	Foo() = default;
    Foo(const Foo&) = delete;
    Foo(Foo&&) = delete;

	Foo(Foo<Foo<R>>&& rhs)
	{
	}
};

/*template<typename R>
Foo(Foo<Foo<R>>&&) -> Foo<R>;*/

int main()
{
	auto r1 = Foo(Foo<Foo<int>>{});
	static_assert(std::is_same_v<decltype(r1)::value_type, int>);
}
```

Compiles with Clang 19.1.0 but fails the static_assert with Clang 20.1.0: https://godbolt.org/z/daqjan7e5
Uncommenting the explicit deduction guide seems to work around the issue.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to