From: Chris Newbold (Chris.Newbold_at_[hidden])
Date: 2008-07-14 21:24:21
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of JOAQUIN M. LOPEZ MUÑOZ
> Sent: Friday, July 11, 2008 11:35 AM
> These precedence rules do not apply to class template static data: quoting
> the standard (latest draft at http://www.open-
> section 3.6.2:
Ah! This is just the sort of explanation I was looking for, but could not find--I guess my copy of the C++ standard has gone stale.
Based on this, it certainly would appear that GCC's behavior is conformant and that the combination of fast_pool_allocator and singleton_default presumes behavior which is unspecified.
> BTW, have you tried the fix I was proposing?
Not yet. I'm on vacation this week, but I will try it as soon as possible. My only concern is whether referencing singleton_default from the constructor for fast_pool_singleton will guarantee proper initialization ordering.
3.6.2 doesn't really shed any light on how ordered and unordered initialization may be coupled. There isn't, for example, any expressed guarantee that non-locals will be initialized prior to first reference.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk