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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/44969
2
 
3
template struct enable_if { typedef T type; };
4
template struct enable_if { };
5
 
6
template
7
  class mini_is_constructible
8
  {
9
    typedef char one;
10
    typedef struct { char arr[2]; } two;
11
 
12
    template
13
      static typename
14
      enable_if<(sizeof(Tp1(Arg1_(), Arg2_()), 1) > 0), one>::type
15
      test(int);
16
 
17
    template
18
      static two test(...);
19
 
20
  public:
21
    static const bool value = sizeof(test(0)) == 1;
22
  };
23
 
24
class A { };
25
 
26
int Test[mini_is_constructible::value ? -1 : 1];

powered by: WebSVN 2.1.0

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