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
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
extern_template-4.C
blob
9f0c7d720ab66823569d5388301eb945c834de4b
1
// PR c++/85470
2
// { dg-do compile { target c++11 } }
3
4
template <class T>
5
struct StaticObject
6
{
7
static T& create()
8
{
9
static T t;
10
return t;
11
}
12
13
static T & instance;
14
};
15
16
template <class T> T & StaticObject<T>::instance = StaticObject<T>::create();
17
18
extern template class StaticObject<int>;
19
20
void test()
21
{
22
StaticObject<int>::instance;
23
}