|
Boost : |
From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-03-07 14:09:35
On Fri, 7 Mar 2003 18:17:56 +0100, Pavol Droba <droba_at_[hidden]>
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.
Genny.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk