1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// PR c++/52688 // { dg-do link } template<typename T> T f() { static const double staticLocalVariable = 100.0; struct local { static double f() { return staticLocalVariable; } }; return T(local::f()); } int main() { f<double>(); }