public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51194] New: ICE about template aliasing
@ 2011-11-17 13:19 fate66260 at gmail dot com
  2011-11-17 17:37 ` [Bug c++/51194] " dodji at seketeli dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: fate66260 at gmail dot com @ 2011-11-17 13:19 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: fate66260@gmail.com


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-11-20  7:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17 13:19 [Bug c++/51194] New: ICE about template aliasing fate66260 at gmail dot com
2011-11-17 17:37 ` [Bug c++/51194] " dodji at seketeli dot org
2011-11-18  9:50 ` fate66260 at gmail dot com
2011-11-18 15:14 ` [Bug c++/51194] [C++0x] " dodji at gcc dot gnu.org
2011-11-18 19:49 ` dodji at gcc dot gnu.org
2011-11-19 14:57 ` dodji at gcc dot gnu.org
2011-11-20  7:19 ` dodji at gcc dot gnu.org
2011-11-20  9:04 ` dodji at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).