================ @@ -237,8 +237,17 @@ static_assert(__is_same(decltype(s.t), int)); // explicit deduction guide. Foo(int) -> Foo<X>; AFoo s2{i}; -// FIXME: the type should be X because of the above explicit deduction guide. -static_assert(__is_same(decltype(s2.t), int)); +static_assert(__is_same(decltype(s2.t), X)); + + +template<class T> +using BFoo = AFoo<T>; +static_assert(__is_same(decltype(BFoo(i).t), X)); + + +Foo(double) -> Foo<int>; +static_assert(__is_same(decltype(AFoo(1.0).t), int)); +static_assert(__is_same(decltype(BFoo(1.0).t), int)); ---------------- shafik wrote:
Can we get more complicated test cases, w/ multiple template params and multiple constructor arguments etc e.g.: https://compiler-explorer.com/z/x8PhEqWeo We should really be trying harder to stress test our implementation. Does it fix this case: https://godbolt.org/z/b84rzhjjK if not we need to open a bug. https://github.com/llvm/llvm-project/pull/125478 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits