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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [underlying_type9.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
 
4
template
5
  struct is_same
6
  { static const bool value = false; };
7
 
8
template
9
  struct is_same
10
  { static const bool value = true; };
11
 
12
enum E1 : unsigned { };
13
enum E2 : char { };
14
enum class E3 { };
15
enum class E4 : unsigned char { c = 1 };
16
enum class E5 : int { a = -1, b = 1 };
17
enum class E6 : long { c = __LONG_MAX__ };
18
 
19
template
20
  struct test
21
  {
22
    static_assert(is_same::value, "Error");
23
  };
24
 
25
test<__underlying_type(E1), unsigned>       t1;
26
test<__underlying_type(E2), char>           t2;
27
test<__underlying_type(E3), int>            t3;
28
test<__underlying_type(E4), unsigned char>  t4;
29
test<__underlying_type(E5), int>            t5;
30
test<__underlying_type(E6), long>           t6;

powered by: WebSVN 2.1.0

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