http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54575
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-14 17:38:07
UTC ---
(In reply to comment #4)
> Would this do? ;-)
> ......................................
> template<typename _From, typename _To>
> struct is_convertible { static const bool value = true; };
>
> template<bool> struct enable_if { };
> template<> struct enable_if<true> { typedef int type; };
>
> template<typename _InIter>
> using _RequireInputIter
> = typename enable_if<is_convertible<_InIter,bool>::value>::type;
>
> template<typename _Tp> struct X {
> template<typename _InputIterator,
> typename = _RequireInputIter<_InputIterator>>
> void insert(_InputIterator) {}
> };
>
> template<typename> void foo() {
> X<int> subdomain_indices;
> subdomain_indices.insert(0);
> }
> .........................................
>
>
> gcc -std=c++11 -c x.ii
> x.ii: In function 'void foo()':
> x.ii:13:7: internal compiler error: tree check: expected class 'type', have
> 'exceptional' (error_mark) in strip_typedefs, at cp/tree.c:1215
> typename = _RequireInputIter<_InputIterator>>
> ^
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
This is caused by revision 190830:
http://gcc.gnu.org/ml/gcc-cvs/2012-08/msg00808.html