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