This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Forward declaring standard library classes



cow@compsoc.man.ac.uk said:
> This won't work for _UseSwap<int> and we need the algorithms to work
> with more value_types than just the std containers that provide a
> swappable member. 

For those types (POD) you can always rely on specialization.

template<>
struct _UseSwap<int> {
     {enum{_M_type = 1 };};
};

What's the problem ??
But maybe there is something I do not understand.

Then I would say that it is a pity that POD are under-types in C++ (you 
cannot derive from them, can't ask for some properties, ...). I 
really believe that this should be changed, but that's another story.

	Theo.


--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]