
23 Nov
2007
23 Nov
'07
12:04 p.m.
Joaquín Mª López Muñoz wrote:
Ok, so we've got a case again. John, let me re-ask you about what we should do regarding this compiler bug. For your reference, the offending code does not involve name hiding anymore:
Yes it does: foo::swap is still in the current scope :-( Making swap_ a non-member function would fix it (I hope!): template <class T> void call_swap(T& a, T& b) { using std::swap; swap(a, b); } template<typename T> struct foo { T t; foo():t(0){} void swap(foo& x){call_swap(t, x.t);} }; Does this help? John.