Boost logo

Boost Users :

From: Hansi (hansipet_at_[hidden])
Date: 2008-05-28 05:38:08


John Maddock schrieb:
> Hansi wrote:
>> Hello,
>>
>> Is it possible to use the type_traits library to detect if a template
>> type is a template specialization from a specific type.
>>
>> In my case I want to detect the dependency of the endian class from
>> the
>> vault.
>>
>> e.g. something like that:
>>
>> template<typename myType>
>> is_the_type(endian, myType)
>
> You can't tell if an aribrary template is a specialization or the primary
> template definition, but you can detect specific types with is_same, is that
> what you wanted to do?
>

no not really. Because I want it to make it generic and I want to detect
  if a type is a endian type (this implementation which is disussed at
the moment in the development forum) and here are a lot of definitions...
May be there is another possibility with constraints. Is it possible to
detect if the class has the:
typedef T value_type
and
an operator overloading
operator()

I think this would also solve the problem...

Thanks
Hansjörg

> John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net