[Bug c++/54575] [4.8 Regression] ICE with std::vector::insert and -std=c++11
bangerth at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 14 11:49:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54575
--- Comment #4 from Wolfgang Bangerth <bangerth at gmail dot com> 2012-09-14 11:48:56 UTC ---
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.
More information about the Gcc-bugs
mailing list