|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-01-05 02:05:59
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk