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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [is_final.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++/51365
2
// { dg-do compile }
3
// { dg-options "-std=c++0x" }
4
 
5
struct A { };
6
static_assert( ! __is_final (A), "A not final" );
7
 
8
struct Af final { };
9
static_assert( __is_final (Af), "Af is final" );
10
 
11
class B { };
12
static_assert( ! __is_final (B), "B not final" );
13
 
14
class Bf final { };
15
static_assert( __is_final (Bf), "Bf is final" );
16
 
17
struct C : private A, private B { };
18
static_assert( ! __is_final (C), "C not final" );
19
 
20
struct Cf final : private A, private B { };
21
static_assert( __is_final (Cf), "Cf is final" );
22
 
23
struct D { virtual ~D() final { } };
24
static_assert( ! __is_final (D), "D not final" );
25
 
26
struct Df final { virtual ~Df() final { } };
27
static_assert( __is_final (Df), "Df is final" );
28
 
29
template struct E { };
30
static_assert( ! __is_final (E), "E not final" );
31
static_assert( ! __is_final (E),  "E not final" );
32
 
33
template struct Ef final { };
34
static_assert( __is_final (Ef), "Ef is final" );
35
static_assert( __is_final (Ef),   "Ef is final" );
36
static_assert( __is_final (Ef),  "Ef is final" );
37
 
38
template struct F { virtual ~F() final { }; };
39
static_assert( ! __is_final (F), "F not final" );
40
static_assert( ! __is_final (F),  "F not final" );
41
 
42
template struct Ff final { virtual ~Ff() final { }; };
43
static_assert( __is_final (Ff), "Ff is final" );
44
static_assert( __is_final (Ff),   "Ff is final" );
45
static_assert( __is_final (Ff),  "Ff is final" );
46
 

powered by: WebSVN 2.1.0

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