This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Forward declaring standard library classes
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- To: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- Cc: Chris Jefferson <caj at cs dot york dot ac dot uk>, libstdc++ at gcc dot gnu dot org
- Date: Sat, 20 Nov 2004 01:20:18 +0100
- Subject: 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
--------------------------------------------------------------------