fork download
  1. #include <iostream>
  2. #include <type_traits>
  3. using namespace std;
  4.  
  5. template <typename T, typename U>
  6. struct decay_equiv :
  7. std::is_same<typename std::decay<T>::type, U>::type
  8. {};
  9.  
  10. int main() {
  11.  
  12. int A[][3] = {
  13. { 1, 2, 3 },
  14. { 4, 5, 6 },
  15. { 7, 8, 9 },
  16. { 10, 11, 12 }
  17. };
  18.  
  19. std::cout << std::boolalpha
  20. << decay_equiv<decltype(A), int(*)[3]>::value << '\n';
  21. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
true