Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-07-09 10:40:22


Author: djowel
Date: 2008-07-09 10:40:21 EDT (Wed, 09 Jul 2008)
New Revision: 47267
URL: http://svn.boost.org/trac/boost/changeset/47267

Log:
fixes trac ticket #1892: boost::spirit::static_ causes link error (using wave)
Text files modified:
   trunk/boost/spirit/home/classic/core/non_terminal/impl/static.hpp | 38 +++++++++++++++++++++-----------------
   1 files changed, 21 insertions(+), 17 deletions(-)

Modified: trunk/boost/spirit/home/classic/core/non_terminal/impl/static.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/core/non_terminal/impl/static.hpp (original)
+++ trunk/boost/spirit/home/classic/core/non_terminal/impl/static.hpp 2008-07-09 10:40:21 EDT (Wed, 09 Jul 2008)
@@ -42,29 +42,33 @@
     struct static_
         : boost::noncopyable
     {
- typedef T value_type;
- typedef typename boost::call_traits<T>::reference reference;
- typedef typename boost::call_traits<T>::const_reference const_reference;
+ private:
 
- static_(Tag = Tag())
+ struct destructor
         {
- struct destructor
+ ~destructor()
             {
- ~destructor()
- {
- static_::get_address()->~value_type();
- }
- };
+ static_::get_address()->~value_type();
+ }
+ };
 
- struct default_ctor
+ struct default_ctor
+ {
+ static void construct()
             {
- static void construct()
- {
- ::new (static_::get_address()) value_type();
- static destructor d;
- }
- };
+ ::new (static_::get_address()) value_type();
+ static destructor d;
+ }
+ };
+
+ public:
 
+ typedef T value_type;
+ typedef typename boost::call_traits<T>::reference reference;
+ typedef typename boost::call_traits<T>::const_reference const_reference;
+
+ static_(Tag = Tag())
+ {
             boost::call_once(&default_ctor::construct, constructed_);
         }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk