Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-11-08 05:17:30


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


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