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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/44907
2
// { dg-options "-std=c++0x" }
3
 
4
#include 
5
 
6
struct A { };
7
 
8
struct B
9
: public A { };
10
 
11
struct C
12
: public A { };
13
 
14
struct D
15
: public B, public C { };
16
 
17
template
18
  class mini_is_convertible
19
  {
20
    typedef char one;
21
    typedef struct { char arr[2]; } two;
22
 
23
    template
24
      static void test_aux(To1);
25
 
26
    template
27
      static decltype(test_aux(std::declval()), one())
28
      test(int);
29
 
30
    template
31
      static two test(...);
32
 
33
    public:
34
      static const bool value = sizeof(test(0)) == 1;
35
  };
36
 
37
template
38
  const bool mini_is_convertible::value;
39
 
40
static_assert (!mini_is_convertible::value, "");
41
static_assert (!mini_is_convertible::value, "");
42
static_assert (!mini_is_convertible::value, "");
43
static_assert (!mini_is_convertible::value, "");
44
static_assert (!mini_is_convertible::value, "");
45
static_assert (!mini_is_convertible::value, "");

powered by: WebSVN 2.1.0

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