fork(2) download
  1. template<typename T>
  2. struct CheckTmp
  3. {
  4. static constexpr bool Value = false;
  5. };
  6. template<template<typename...> class Template, typename... ArgsT>
  7. struct CheckTmp<Template<ArgsT...>>
  8. {
  9. static constexpr bool Value = true;
  10. };
  11.  
  12. template<typename T>
  13. struct Foo
  14. {
  15. };
  16.  
  17. template<typename... T>
  18. struct Bar
  19. {
  20. };
  21.  
  22. int main()
  23. {
  24. static_assert(!CheckTmp<int>::Value, "not working");
  25. static_assert(CheckTmp<Foo<void>>::Value, "not working");
  26. static_assert(CheckTmp<Bar<char, double>>::Value, "not working");
  27. static_assert(CheckTmp<Bar<>>::Value, "not working");
  28. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty