Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-07-10 13:31:42


AMDG

I'm looking at two recent posts:
http://comments.gmane.org/gmane.comp.lib.boost.devel/177370
http://comments.gmane.org/gmane.comp.lib.boost.user/37476

Either of these is fine by itself, but putting them both
together makes it very easy to cause silent ODR
problems. For example in translation unit a.cpp we
#include "boost/tuple/tuple_io.hpp"
and translation unit b.cpp we forget. Then, along comes
boost::any which detects operator<< in translation
unit a.cpp, but uses its default in translation unit
b.cpp. Ka-Boom.

This is not a huge problem at the moment, because it's
quite difficult to make the detection bullet-proof,
but I'm very concerned because C++0x concepts
are supposed to make such overloading easy.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk