Forward declaring standard library classes
Jonathan Wakely
cow@compsoc.man.ac.uk
Fri Nov 19 13:07:00 GMT 2004
On Fri, Nov 19, 2004 at 10:50:45AM +0100, Theodore Papadopoulo wrote:
> Then define you _UseSwap as:
>
> template<typename _Tp>
> struct _UseSwap {
> {enum{_M_type = SOMETHING(_Tp::swappable)};};
> };
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.
I don't see how SFINAE can be used to avoid that here, but that might
just be my ignorance.
jon
--
"All men naturally desire knowledge."
- Aristotle
More information about the Libstdc++
mailing list