
7 Nov
2007
7 Nov
'07
10:50 p.m.
AMDG Michael Marcin <mmarcin <at> method-solutions.com> writes:
namespace boost { namespace ptr_container_detail { const char* const count = "count"; const char* const item = "item"; const char* const first = "first"; const char* const second = "second"; } }
Alas, that only replace one form of ODR violation with more subtle one. static const char* count = "count"; void foo(const char*); inline void bar() { // ODR violation here. count refers to // different objects in different translation // units. (See section 3.2/5 of the standard.) foo(count); } In Christ, Steven Watanabe