repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git]
/
main
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nsdmi-template1.C
blob
7316dc6529c988e5d8fb4ff8f6505730ce4175b4
1
// { dg-do run { target c++11 } }
2
3
struct base
4
{
5
int calc_avg() { return 42; }
6
};
7
8
template <class T> struct nsdmi : T
9
{
10
nsdmi() {}
11
int avg() { return avg_; }
12
int avg_ = this->calc_avg();
13
};
14
15
int main()
16
{
17
nsdmi<base> x;
18
if (x.avg() != 42)
19
__builtin_abort();
20
}