
25 Jul
2006
25 Jul
'06
1:32 p.m.
Martin Wille wrote:
Joe Gottman wrote:
In order to avoid having an unnamed namespace inside a header file, none.hpp has been rewritten as
namespace boost { none_t const none = ((none_t)0) ; } // namespace
But if two source files contain none.hpp won't this violate the one-definition rule?
none would have internal linkage according to 7.1.5.1/2. So it wouldn't violate the ODR. But a pointer to none from one translation unit would differ from a pointer to none from a different TU.
Does this difference matter? Fernando Cacciola