Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-11-23 14:04:22

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;
  void swap(foo& x){call_swap(t, x.t);}

Does this help?


Boost list run by bdawes at, gregod at, cpdaniel at, john at