File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -234,16 +234,19 @@ int i = 0;
234234AFoo s{i};
235235static_assert (__is_same(decltype (s.t), int ));
236236
237- // explicit deduction guide.
238- Foo (int ) -> Foo<X>;
239- AFoo s2{i};
240- static_assert (__is_same(decltype (s2.t), X));
241-
242-
243237template <class T >
244238using BFoo = AFoo<T>;
245- static_assert (__is_same(decltype (BFoo(i).t), X));
246239
240+ // template explicit deduction guide.
241+ template <class T >
242+ Foo (T) -> Foo<float >;
243+ static_assert (__is_same(decltype (AFoo(i).t), float ));
244+ static_assert (__is_same(decltype (BFoo(i).t), float ));
245+
246+ // explicit deduction guide.
247+ Foo (int ) -> Foo<X>;
248+ static_assert (__is_same(decltype (AFoo(i).t), X));
249+ static_assert (__is_same(decltype (BFoo(i).t), X));
247250
248251Foo (double ) -> Foo<int >;
249252static_assert (__is_same(decltype (AFoo(1.0 ).t), int ));
You can’t perform that action at this time.
0 commit comments