fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. template <typename String>
  5. struct First {
  6. using ArrayType = std::vector<int>;
  7. };
  8.  
  9. template <typename String, typename T>
  10. struct Second {
  11. void go() { std::cout << "General\n"; }
  12. };
  13.  
  14. template <typename String>
  15. struct Second < String, typename First<String>::ArrayType > {
  16. void go() { std::cout << "Specialized\n"; }
  17. };
  18.  
  19.  
  20. int main() {
  21. Second < std::vector<int>, std::vector<int> > second;
  22. second.go();
  23. return 0;
  24. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Specialized