Re: [Boost-bugs] [Boost C++ Libraries] #3658: Remove dependency on static initialization/destruction order

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3658: Remove dependency on static initialization/destruction order
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-27 09:21:40


#3658: Remove dependency on static initialization/destruction order
-------------------------------+--------------------------------------------
  Reporter: andysem | Owner: joaquin
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.42.0 | Component: flyweight
   Version: Boost 1.41.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+--------------------------------------------
Changes (by joaquin):

  * status: new => closed
  * resolution: => invalid

Comment:

 The issue is a known limitation of static_holder that can't be
 dealt with in a more satisfactory manner than its current
 implementation. The solution requires some user help, as explained
 in

 http://www.boost.org/libs/flyweight/doc/tutorial/technical.html#static_init

 In your particular case, add the following before the line
 where p is declared:

 {{{
 static boost::flyweight< boost::flyweights::key_value< int, A >
>::initializer fwinit;
 boost::shared_ptr< B > p;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3658#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC