OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [sfinae23.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/48647
// { dg-options -std=c++0x }

template< class T >
T&& declval();

template< class T, class U >
decltype( true ? declval<T>() : declval<U>() ) test( int );

template< class T, class U >
void test( ... );


template< class T, class U >
struct is_same {
  static const bool value = false;
};

template< class T >
struct is_same<T, T> {
  static const bool value = true;
};

#define SA(X) static_assert ((X),#X)

typedef decltype( test<int*, double*>(0) ) void_expected;
SA ((is_same<void_expected, void>::value));
SA ((!is_same<void_expected, void*>::value));

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.