fork(1) download
  1. #include <iostream>
  2. #include <array>
  3.  
  4. template<class T>
  5. struct A{
  6. constexpr static int value=0;
  7. };
  8.  
  9. template<template<typename>class T,typename...Args>
  10. struct A<T<Args...>>
  11. {
  12. constexpr static int value=1;
  13. };
  14.  
  15. template<template<typename>class T,typename...Args>
  16. struct A<T<Args...> const>
  17. {//const container used for type of return arguments
  18. constexpr static int value=2;
  19. };
  20.  
  21. int main()
  22. {
  23. using Type=const std::array<int,10>;
  24. std::cout<<A<Type>::value;
  25. }
  26.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Standard output is empty