
1 Jul
2004
1 Jul
'04
3:49 p.m.
Daniel Frey <daniel.frey@aixigo.de> writes:
David Abrahams wrote:
Daniel Frey <daniel.frey@aixigo.de> writes: Not unless you make it generic: template< typename T > void reset( T& t ) { using std::swap; T x; swap(x, t); }
It depends on whether or not we expect users to provide swap() as a member function or as a free function for their own classes.
We (meaning I) expect a free function :-) -- Dave Abrahams Boost Consulting http://www.boost-consulting.com