fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Foo {
  5. static int const value = 42;
  6. };
  7.  
  8. template<typename T>
  9. void f(T const& k ){
  10. std::cout << k;
  11. }
  12.  
  13. int main() {
  14. std::cout << Foo::value;
  15. f(Foo::value); // blad, nie wiem dlaczego
  16. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
4242