fork(1) download
  1. #include <iostream>
  2.  
  3. template<typename T>
  4. T f()
  5. {
  6. static const double staticLocalVariable = 100.0;
  7. struct local
  8. {
  9. static double f() { return staticLocalVariable; }
  10. };
  11. return T(local::f());
  12. }
  13.  
  14. int main() {
  15. std::cout << f<double>() << std::endl;
  16. }
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
0