Re: [Boost-bugs] [Boost C++ Libraries] #1732: Require clarification on boost::serialization::singleton

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1732: Require clarification on boost::serialization::singleton
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-30 00:35:51


#1732: Require clarification on boost::serialization::singleton
--------------------------------------------------------+-------------------
  Reporter: Sohail Somani <boost-trac_at_[hidden]> | Owner: ramey
      Type: Support Requests | Status: new
 Milestone: To Be Determined | Component: serialization
   Version: Boost Development Trunk | Severity: Not Applicable
Resolution: | Keywords:
--------------------------------------------------------+-------------------
Comment (by Sohail Somani <boost-trac_at_[hidden]>):

 Argh. Foiled by wiki formatting. The formatted code snippet:
 {{{
 #!cpp
     BOOST_DLLEXPORT static T & instance;
     // include this to provoke instantiation at pre-execution time
     static void use(T const &) {}
     static T & get_instance(){
         static T t;
         // refer to instance, causing it to be instantiated (and
         // initialized at startup on working compilers)
         use(instance);
         return t;
     }
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1732#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:49:57 UTC