Forward declaring standard library classes
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Sat Nov 20 00:23:00 GMT 2004
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
--------------------------------------------------------------------
More information about the Libstdc++
mailing list