fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <typename T, int N>
  5. struct vec{
  6. // bla bla bla
  7. int getSize(){
  8. return N;
  9. }
  10. };
  11.  
  12. template <typename T, int N, int M>
  13. vec<T, N + M> plusplus(vec<T, N> v1, vec<T, M> v2){
  14. return vec<T, N + M>();
  15. }
  16.  
  17. int main() {
  18. vec<int, 1> v1;
  19. vec<int, 3> v2;
  20. cout << plusplus(v1, v2).getSize();
  21. return 0;
  22. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
4