OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/49996
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-deref.C
1
// { dg-options -std=c++0x }
2
3
struct A
4
{
5
const int *p[2];
6
};
7
8
constexpr const int * f(const int *p) { return p; }
9
10
int main()
11
{
12
constexpr int i = 42;
13
constexpr int j = *&i; // OK
14
constexpr int k = *A{{&i}}.p[0]; // OK
15
constexpr int l = *f(&i); // OK
16
}