Skip to content

Commit 174edca

Browse files
opensdhzygoloid
authored andcommitted
[over.match.class.deduct] Simplify example
1 parent bfa0e69 commit 174edca

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

source/overloading.tex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,15 +1726,10 @@
17261726
D d1 = {1, 2}; // error: deduction failed
17271727
D d2 = {1, 2, 3}; // OK, braces elided, deduces \tcode{D<int>}
17281728

1729-
template <typename T>
1730-
struct I {
1731-
using type = T;
1732-
};
1733-
17341729
template <typename T>
17351730
struct E {
1736-
typename I<T>::type i;
17371731
T t;
1732+
decltype(t) t2;
17381733
};
17391734

17401735
E e1 = {1, 2}; // OK, deduces \tcode{E<int>}

0 commit comments

Comments
 (0)