fork(1) download
  1. #include <iostream>
  2.  
  3. struct A {
  4. int idx;
  5. A() : idx(-1) {}
  6. template<int idx>
  7. void foo() {
  8. std::cout << idx << std::endl;
  9. }
  10. };
  11.  
  12. int main(){
  13. A a;
  14. a.foo<42>();
  15. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
-1