2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-65080.C
blobd4b49482bbbb463b81ad58120440c2fe416ae533
1 // PR c++/65080
2 // { dg-do compile { target c++11 } }
4 template <typename T>
5 static constexpr T xxx(){ return T(); }
7 template <typename T>
8 struct foo {
9   using type = T(*)();
10   static constexpr type value[1] = {&xxx<T>};
13 template <typename T>
14 constexpr typename foo<T>::type foo<T>::value[1];
16 int main() {
17   constexpr int x = foo<int>::value[0]();