This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Forward declaring standard library classes
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Cc: Chris Jefferson <caj at cs dot york dot ac dot uk>, libstdc++ at gcc dot gnu dot org
- Date: Fri, 19 Nov 2004 13:07:00 +0000
- Subject: Re: Forward declaring standard library classes
- References: <419D1CAE.7060307@cs.york.ac.uk> <200411190950.iAJ9okBp002253@mururoa.inria.fr>
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