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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-is_literal.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-options -std=c++0x }
2
 
3
#include 
4
 
5
#define IS_LIT(T) (std::is_literal_type::value)
6
#define SA(X) static_assert (X, #X)
7
#define YES(T) SA(IS_LIT(T))
8
#define NO(T) SA(!IS_LIT(T))
9
 
10
enum E1 { };
11
enum class E2 { };
12
struct Literal {};
13
 
14
struct NotLiteral {
15
  ~NotLiteral();
16
};
17
 
18
YES(int);
19
YES(int[]);
20
YES(int[3]);
21
YES(double);
22
YES(void *);
23
YES(decltype (nullptr));
24
YES(int Literal::*);
25
YES(void (Literal::*)());
26
YES(E1);
27
YES(E2);
28
YES(Literal);
29
NO (NotLiteral);
30
YES(NotLiteral *);
31
YES(NotLiteral NotLiteral::*);
32
YES(NotLiteral (NotLiteral::*)(NotLiteral));
33
 
34
struct A {
35
  A(const A&) = default;
36
  A(int);
37
};
38
 
39
NO(A);                          // no constexpr ctor other than copy

powered by: WebSVN 2.1.0

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