fork(5) download
  1. #include <type_traits>
  2.  
  3. template <typename Enable, typename...Args>
  4. struct Get;
  5.  
  6. template <typename FirstArg, typename... OtherArgs>
  7. struct Get<typename std::enable_if<true>::type, FirstArg, OtherArgs...>
  8. {
  9. using type = FirstArg;
  10. };
  11.  
  12. int main() {
  13. using T = typename Get<int>::type
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:13:31: error: ‘type’ in ‘struct Get<int>’ does not name a type
  using T = typename Get<int>::type
                               ^
stdout
Standard output is empty