
8 Nov
2007
8 Nov
'07
10:17 a.m.
Steven Watanabe skrev:
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,
Ok, but the inline function approach does not have this problem, right? -Thorsten