fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename T, T t>class test2{
  5. public:
  6. void f();
  7. };
  8.  
  9. template<typename T, T t>
  10. void test2<T,t>::f(){
  11. cout<<t;
  12. }
  13.  
  14. int main() {
  15. test2<int,5> t;
  16. t.f();
  17. return 0;
  18. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
5