Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-09-17 10:26:08

 Markus Schöpflin writes:
> Jaap Suter wrote:
> >
> > I think will help you
> > out...
> >
> Either I'm too blind to see it or it is not there.
> But reading the bible (read: the c++ standard), section 5.19 tells
> me that is should look in 9.4.2 (static data members). And sentence
> 4 of 9.4.2 tells me that "The member shall [still] be defined in
> namespace scope if it is used in the program ..."
> (Static data members of class templates) says that
> "A definition for a static data member may be provided in a
> namespace scope enclosing the definition of the static member's
> class template."
> So this looks like the code I posted should be legal?

Yes this is legal. The restriction that "there shall be exactly one definition
of a static data member that is used in a program; no diagnostic required",
does not apply to static data members of templates, so long as the duplicate
definitions are in every sense identical (see 3.2p5).


Boost list run by bdawes at, gregod at, cpdaniel at, john at