Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85983 - trunk/boost/coroutine/v2
From: oliver.kowalke_at_[hidden]
Date: 2013-09-28 11:54:09


Author: olli
Date: 2013-09-28 11:54:09 EDT (Sat, 28 Sep 2013)
New Revision: 85983
URL: http://svn.boost.org/trac/boost/changeset/85983

Log:
coroutine: fix missing 'inline' (MSVC)

Text files modified:
   trunk/boost/coroutine/v2/coroutine.hpp | 55 ++++++++++++++++++---------------------
   1 files changed, 25 insertions(+), 30 deletions(-)

Modified: trunk/boost/coroutine/v2/coroutine.hpp
==============================================================================
--- trunk/boost/coroutine/v2/coroutine.hpp Sat Sep 28 11:46:24 2013 (r85982)
+++ trunk/boost/coroutine/v2/coroutine.hpp 2013-09-28 11:54:09 EDT (Sat, 28 Sep 2013) (r85983)
@@ -58,9 +58,10 @@
     typedef detail::push_coroutine_base< Arg > base_t;
     typedef typename base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( push_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -82,8 +83,6 @@
                 callee, unwind, preserve_fpu, a) );
     }
 
- void nonnull_() {}
-
 public:
     push_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -228,7 +227,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & push_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -318,9 +317,10 @@
     typedef detail::push_coroutine_base< Arg & > base_t;
     typedef typename base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( push_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -342,8 +342,6 @@
                 callee, unwind, preserve_fpu, a) );
     }
 
- void nonnull_() {}
-
 public:
     push_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -488,7 +486,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & push_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -553,9 +551,10 @@
     typedef detail::push_coroutine_base< void > base_t;
     typedef base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( push_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -577,8 +576,6 @@
                 callee, unwind, preserve_fpu, a) );
     }
 
- void nonnull_() {}
-
 public:
     push_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -723,7 +720,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & push_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -757,9 +754,10 @@
     typedef detail::pull_coroutine_base< R > base_t;
     typedef typename base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( pull_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -782,8 +780,6 @@
                 callee, unwind, preserve_fpu, a, result) );
     }
 
- void nonnull_() {}
-
 public:
     pull_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -1060,7 +1056,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & pull_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -1279,9 +1275,10 @@
     typedef detail::pull_coroutine_base< R & > base_t;
     typedef typename base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( pull_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -1304,8 +1301,6 @@
                 callee, unwind, preserve_fpu, a, result) );
     }
 
- void nonnull_() {}
-
 public:
     pull_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -1582,7 +1577,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & pull_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -1797,9 +1792,10 @@
     typedef detail::pull_coroutine_base< void > base_t;
     typedef base_t::ptr_t ptr_t;
 
- struct dummy;
+ struct dummy
+ { void nonnull() {} };
 
- typedef void ( pull_coroutine::*safe_bool)();
+ typedef void ( dummy::*safe_bool)();
 
     ptr_t impl_;
 
@@ -1821,8 +1817,6 @@
                 callee, unwind, preserve_fpu, a) );
     }
 
- void nonnull_() {}
-
 public:
     pull_coroutine() BOOST_NOEXCEPT :
         impl_()
@@ -2099,7 +2093,7 @@
     { return ! impl_; }
 
     operator safe_bool() const BOOST_NOEXCEPT
- { return ( empty() || impl_->is_complete() ) ? 0 : & pull_coroutine::nonnull_; }
+ { return ( empty() || impl_->is_complete() ) ? 0 : & dummy::nonnull; }
 
     bool operator!() const BOOST_NOEXCEPT
     { return empty() || impl_->is_complete(); }
@@ -2246,6 +2240,7 @@
         ::new( a.allocate( 1) ) object_t( forward< coroutine_fn >( fn), attr, stack_alloc, a) );
 }
 
+inline
 push_coroutine< void >::push_coroutine( coroutine_fn fn, attributes const& attr,
            stack_allocator const& stack_alloc,
            std::allocator< push_coroutine > const& alloc,


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