c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / var-templ3.C
blob254f388acee6ef5627a82d49b9f68660dd06d4c2
1 // { dg-do compile { target c++14 } }
3 template<typename T>
4  constexpr int var = sizeof (T);
6 template<typename T>
7   struct S1
8   {
9     template<typename U>
10     static constexpr int a = sizeof (U) + sizeof (T);
11   };
13 int main ()
15   static_assert(var<int> + var<char> == S1<int>::a<char>, "");