#include <CHArray.H>
Use the SFINAE principle as described in 15.2.2 "Determining Class Types" in Vandevoorde and Josuttis "C++ Templates" book to see if T is class type. E.g., TypeTr<int>::IsClass == false TypeTr<Box>::IsClass == true
Public Types | |
| enum | { IsClass = sizeof(TypeTr<T>::template test<T>(0)) == 1 } |
Private Types | |
| typedef char | One |
Static Private Member Functions | |
| template<typename C> | |
| static One | test (int C::*) |
| template<typename C> | |
| static Two | test (...) |
Classes | |
| struct | Two |
typedef char ArSp::TypeTr< T >::One [private] |
| static One ArSp::TypeTr< T >::test | ( | int C::* | ) | [inline, static, private] |
| static Two ArSp::TypeTr< T >::test | ( | ... | ) | [inline, static, private] |
1.5.5