From a49cf433f79f0fae149f1cb15b4197d292726f8d Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 7 Dec 2015 18:47:35 +0100 Subject: [PATCH] some code formating --- include/boost/fiber/future/detail/shared_state.hpp | 8 ++++---- include/boost/fiber/future/packaged_task.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/fiber/future/detail/shared_state.hpp b/include/boost/fiber/future/detail/shared_state.hpp index 7a12559a..ca031cd8 100644 --- a/include/boost/fiber/future/detail/shared_state.hpp +++ b/include/boost/fiber/future/detail/shared_state.hpp @@ -40,9 +40,9 @@ private: mutable condition waiters_{}; protected: - mutable mutex mtx_{}; - bool ready_{ false }; - std::exception_ptr except_{}; + mutable mutex mtx_{}; + bool ready_{ false }; + std::exception_ptr except_{}; void mark_ready_and_notify_( std::unique_lock< mutex > & lk) noexcept { ready_ = true; @@ -208,7 +208,7 @@ public: template< typename R > class shared_state< R & > : public shared_state_base { private: - R * value_{ nullptr }; + R * value_{ nullptr }; void set_value_( R & value, std::unique_lock< mutex > & lk) { if ( ready_) { diff --git a/include/boost/fiber/future/packaged_task.hpp b/include/boost/fiber/future/packaged_task.hpp index 857cec16..26567067 100644 --- a/include/boost/fiber/future/packaged_task.hpp +++ b/include/boost/fiber/future/packaged_task.hpp @@ -57,9 +57,9 @@ public: typedef std::allocator_traits< typename object_t::allocator_t > traits_t; + typename object_t::allocator_t a{ alloc }; typename traits_t::pointer ptr{ traits_t::allocate( a, 1) }; - try { traits_t::construct( a, ptr, a, std::forward< Fn >( fn) ); } catch (...) {