Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2002-11-15 23:55:53


> > Hi,
> >
> > Does anybody know how to implement type traits that will allow me to
check
> > whether argument type T is instance od template A. Particularly I am
> > interested in mpl sequences. I.e.:
> >
> > is_instance_of<T,mpl::list>::value
>
> Check out boost/lambda/detail/is_instance_of.hpp
>
> /Jaakko

1. Could we make it an "official" type trait?
2. Could we make if work with no template template support?
I was thinking about:
is_instance_of<T,mpl::list<_> >::value
But I do not understand how mpl::lambda is working yet, so it could be
complete nonsense.
3. Why there is no namely is_instance_of version without number of template
parameters explicitly specified.
Could not you deduce it automatically?
4. Why it is limited only to 4 template parameters?

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk