
5 Jan
2005
5 Jan
'05
7:05 a.m.
Mårten Rånge wrote:
As a side note, I got inspired by the technique used when to enable/disable template class specializations using boost::enable_if and succeeded in creating something that managed this:
struct x { typedef std::string aggregated_type; };
struct y { };
int main(int, char*) { std::cout << is_aggregated_type_available<x>::value << std::endl; std::cout << is_aggregated_type_available<y>::value << std::endl; }
Prints: 1 0
See <boost/mpl/has_xxx.hpp> Jonathan