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


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


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