URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [partial12.C] - Rev 847
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/46105
template< typename T >
struct empty { // support class is like stripped-down enable_if
typedef void type;
};
template< class T, typename v = void > // v is always void!
struct element {
typedef typename T::value_type type;
};
template< class T > // T in deduced context, T::element_type is SFINAE:
struct element< T, typename empty< typename T::element_type >::type > {
typedef typename T::element_type type;
};
template< class T >
struct element< T const, typename empty< typename T::element_type >::type > {
typedef typename T::element_type const type;
};
struct has_et {
typedef int element_type;
};
element<has_et const>::type ip = 0;
Go to most recent revision | Compare with Previous | Blame | View Log