
26 Jul
2008
26 Jul
'08
2:18 p.m.
AMDG Niels Dekker - mail address until 2008-12-31 wrote:
Once the boost::swap utility would be used by other Boost libraries, end users might want to add a custom overload of swap for their classes to the boost namespace. Especially when users would have to deal with lacking ADL support of their compiler. Would it be okay for them to do so? Or are there some moral objections, or technical issues, regarding a user-provided overload within the boost namespace?
Adding overloads to namespace boost is not guaranteed to work either. template<class T> void foo(T& t1, T&t2) { boost::swap(t1, t2); } class X {}; namespace boost { void swap(X&, X&); // not found by foo. } In Christ, Steven Watanabe