fork(1) download
  1. #include <iostream>
  2. #include <cstddef>
  3.  
  4. int templateParam;
  5.  
  6. template <int &D> struct TestTemplate {
  7. int value() {}
  8. };
  9.  
  10. template <> int TestTemplate<templateParam>::value() {
  11. return templateParam;
  12. }
  13.  
  14. TestTemplate<templateParam> testVariable;
  15.  
  16. int main() {
  17.  
  18. std::cout << testVariable.value() << "\n";
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 2684KB
stdin
Standard input is empty
stdout
0