[Bug c++/49229] New: [C++0x][SFINAE] ICE with variadics and depending non-type default parameter
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Mon May 30 11:20:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229
Summary: [C++0x][SFINAE] ICE with variadics and depending
non-type default parameter
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
CC: jason@redhat.com
gcc 4.7.0 20110528 (experimental) in C++0x mode produces an ICE with the
following program at the line marked with #:
//-----
extern void* enabler;
template<bool, class = void>
struct enable_if {};
template<class T>
struct enable_if<true, T> {
typedef T type;
};
template<class... Bn>
struct and_;
template<class B1>
struct and_<B1> : B1 {};
template<class, class>
struct is_same {
static constexpr bool value = false;
};
template<class T>
struct is_same<T, T> {
static constexpr bool value = true;
};
template<class... T>
struct S {
template<class... U,
typename enable_if<and_<is_same<T, U>...>::value>::type*& = enabler
>
S(U...){} // #
};
S<bool> s(0);
//-----
"internal compiler error: tree check: expected tree_vec, have error_mark in
comp_template_args, at cp/pt.c:6534"
This bug is possibly related to bug 49225.
More information about the Gcc-bugs
mailing list