http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51194
Bug #: 51194
Summary: ICE about template aliasing
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
compiler option: -Wall -std=c++0x
error message:
242:43: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in lookup_template_class_1, at cp/pt.c:7293
code:
/*
including, boost/mpl/and.hpp
boost/type_traits/is_same.hpp
*/
template < bool, class T = void >
enable_if_c
{
typedef T type;
};
template < class T >
enable_if_c<false, T>
{ };
template < class Cond, class T = void >
using enable_if = enable_if_c<Cond::value, T>;
template < template <class...> class... Conds >
struct condition_and
{
template < class... Types >
using enable = enable_if<boost::mpl::and_<Conds<Types>...>>;
};
template < class T, class U = T >
using Test = typename condition_and
<
// For any two parameters meta-functions, same error occurs.
boost::is_same
, boost::is_same
, boost::is_same
>::template enable<T, U>; // here