On Fri, Mar 07, 2003 at 04:54:14PM +0000, John Fletcher wrote:
> 
> 
> Pavol Droba wrote:
> 
> > I wanted to do something else:
> >
> >         template <class T> struct trait_class
> >    {
> >    ....
> >    }
> >
> >    template <class T> struct trait_class<std::vector<T> >
> >    {
> >    ....
> >    }
> >
> > without #include <vector>
> >
> > Is this possible? Or is there a way how to achieve the same efect, but without 
> > including <vector>?
> >
> > I see, that is probably isn't ..
> >
> 
> Pavol
> 
> Could you put each specialisation in a separate header file and arrange only to 
> include the ones which you
> need, the vector one when you include <vector> etc?
> 

I see this as the only possibility. It's not very nice though. This way user is 
required to include a header
each time he want to use a container. It gets even more confusing, because the trait 
class is supposed to 
be only an implementation detail. However this way, users either accept the inclusion 
of unwanted headers,
or they have to include specific header manualy. 

Typical now win solution :(


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to