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
/
constexpr-65080.C
blob
d4b49482bbbb463b81ad58120440c2fe416ae533
1
// PR c++/65080
2
// { dg-do compile { target c++11 } }
3
4
template <typename T>
5
static constexpr T xxx(){ return T(); }
6
7
template <typename T>
8
struct foo {
9
using type = T(*)();
10
static constexpr type value[1] = {&xxx<T>};
11
};
12
13
template <typename T>
14
constexpr typename foo<T>::type foo<T>::value[1];
15
16
int main() {
17
constexpr int x = foo<int>::value[0]();
18
}