fork download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4. struct Outer
  5. {
  6. template<typename T, typename = void>
  7. struct Inner
  8. {
  9. };
  10. template<typename T>
  11. struct Inner
  12. <
  13. typename std::enable_if
  14. <
  15. std::is_same<T, double>::value,
  16. T
  17. >::type,
  18. T
  19. >
  20. {
  21. };
  22. };
  23.  
  24. int main()
  25. {
  26. Outer::Inner<int> oii;
  27. Outer::Inner<double> oid;
  28. }
  29.  
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty