$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2006-06-22 08:41:31
Nicolas Fleury <nidoizo_at_[hidden]> writes:
> Is there something like a is_specialization in Boost.Traits? Something
> like:
>
> template <typename TypeT, template<typename> class TemplateTypeT>
> struct is_specialization
> {
> private:
> template <typename T>
> static char foo( TemplateTypeT<T>* );
> static int foo( ... );
> public:
> enum { value = (sizeof(is_specialization::foo((TypeT*)0)) ==
> sizeof(char)) } ;
> };
>
> It's very limited since it only supports a specific number of template
> arguments. The number of template arguments could be passed, but it
> would still cause problems with non-type template arguments. Any ideas?
>
> Maybe something like:
> BOOST_IS_SPECIALIZATION(type, templateType, signature)
> called like:
> BOOST_IS_SPECIALIZATION(myType, std::list, (typename, typename))
See boost/detail/is_xxx.hpp
-- Dave Abrahams Boost Consulting www.boost-consulting.com