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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [partial12.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/46105
2
 
3
template< typename T >
4
struct empty { // support class is like stripped-down enable_if
5
    typedef void type;
6
};
7
 
8
template< class T, typename v = void > // v is always void!
9
struct element {
10
    typedef typename T::value_type type;
11
};
12
 
13
template< class T > // T in deduced context, T::element_type is SFINAE:
14
struct element< T, typename empty< typename T::element_type >::type > {
15
    typedef typename T::element_type type;
16
};
17
 
18
template< class T >
19
struct element< T const, typename empty< typename T::element_type >::type > {
20
    typedef typename T::element_type const type;
21
};
22
 
23
struct has_et {
24
    typedef int element_type;
25
};
26
 
27
element::type ip = 0;

powered by: WebSVN 2.1.0

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