Debian Codegraph @

gcc/testsuite/g++.dg/template/deduce8.C

raw
1 // PR c++/98659
2 // { dg-do compile }
3
4 template <bool> struct enable_if;
5 struct function {
6 template <typename _F> void operator=(_F);
7 };
8 struct map {
9 function operator[](int);
10 };
11 enum { E };
12 template <typename> void foo ();
13 template <typename T>
14 typename enable_if<T::value>::type foo ();
15
16 void
17 bar ()
18 {
19 map m;
20 m[E] = foo<int>;
21 }