Author: Daniel KrüglerDaniel Krügler Date: Apr 13, 2008 16:30
On 13 Apr., 20:45, Carl Barron adelphia.net> wrote:
> The point is
> struct foo
> {
> static const int value = 1;
> };
>
> does not automatically violate ODR only different defintions of foo
> would do so. The sniplet does not involve multiple defintions of foo
> or
> foo::value. and the sniplet is legal and valid.
This is an incorrect/misleading statement as written. The
ODR is does not only rule *multiple* definitions, it does
also rule *missing* definitions. You can interpret that as
a *one-and-only-one-definition*. [basic.def.odr]/3 says
precisely this:
|