On Fri, Mar 07, 2003 at 08:09:35PM +0100, Gennaro Prota wrote: > On Fri, 7 Mar 2003 18:17:56 +0100, Pavol Droba <[EMAIL PROTECTED]> > 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? > > > Practically speaking, no. At least not in a portable, conforming way. > You can (under certain limitations) provide specializations like > > > class A { }; > namespace std { template<> class numeric_limits<A> {}; } > > > but you can't otherwise add declarations to std. There are several > reasons for this limitation. > > AFAIK the committee discussed the possibility to provide fwd versions > of standard headers other than <iosfwd> but decided not to do so. >
My question is then following: How do the boost libraries solve this problem? I see only 2 possibilities, both not very nice. - Silently include all stl container headers ( or at least meny of them ) - Divide the specialization into several files ( one for each container ) and ask the user to include the specific one. Is there some other option I don't know about? Pavol _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost