| 1 |
// PR c++/54575 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
template<typename _From, typename _To> |
| 5 |
struct is_convertible { static const bool value = true; }; |
| 6 |
|
| 7 |
template<bool> struct enable_if { }; |
| 8 |
template<> struct enable_if<true> { typedef int type; }; |
| 9 |
|
| 10 |
template<typename _InIter> |
| 11 |
using _RequireInputIter |
| 12 |
= typename enable_if<is_convertible<_InIter,bool>::value>::type; |
| 13 |
|
| 14 |
template<typename _Tp> struct X { |
| 15 |
template<typename _InputIterator, |
| 16 |
typename = _RequireInputIter<_InputIterator>> |
| 17 |
void insert(_InputIterator) {} |
| 18 |
}; |
| 19 |
|
| 20 |
template<typename> void foo() { |
| 21 |
X<int> subdomain_indices; |
| 22 |
subdomain_indices.insert(0); |
| 23 |
} |