repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-ctor15.C
blob
5ad278a6aa4b73620314b6b561da36117824f03f
1
// PR c++/57694
2
// { dg-do compile { target c++11 } }
3
4
class A
5
{
6
private:
7
int a;
8
const int* const aptr;
9
10
public:
11
constexpr A(int _a) : a(_a), aptr(&a) { }
12
};
13
14
class Data { } d1;
15
16
class B
17
{
18
private:
19
Data* dptr1;
20
21
public:
22
constexpr B(Data* _p) : dptr1(_p) {}
23
};
24
25
class Use
26
{
27
static constexpr A a{2};
28
static constexpr B b{&d1};
29
};