Boost logo

Boost-Commit :

From: matt_calabrese_at_[hidden]
Date: 2007-06-19 01:23:53


Author: matt_calabrese
Date: 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
New Revision: 7096
URL: http://svn.boost.org/trac/boost/changeset/7096

Log:
Revising interlocked operations result types to yield objects with old_value and new_value (documentation not yet updated).

Added:
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default.hpp
      - copied, changed from r7071, /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_dont_include.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result.hpp
      - copied, changed from r7071, /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_dont_include.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_meta.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/result_meta.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result_fwd.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result_fwd.hpp
Removed:
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp
Text files modified:
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result.hpp | 6
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result_fwd.hpp | 9 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_acquire_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_release_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp | 6 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp | 1
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default.hpp | 7 +
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_windows.hpp | 38 +++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_default.hpp | 1
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows.hpp | 45 ++++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp | 3
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp | 3
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp | 3
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default.hpp | 9 +-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_windows.hpp | 42 ++++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_default.hpp | 5
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default.hpp | 9 +-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_windows.hpp | 42 ++++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_windows.hpp | 45 ++++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default.hpp | 34 ++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_default.hpp | 34 ++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default.hpp | 34 ++++++---
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default.hpp | 145 ++++-----------------------------------
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp | 16 ++-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp | 2
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result.hpp | 76 ++------------------
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl.hpp | 1
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_begin_dont_include.hpp | 25 ++++++
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_end_dont_include.hpp | 29 -------
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/interlocked_result.hpp | 77 +++++++++++++++++++++
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp | 14 ++-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default.hpp | 25 ++++-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_default.hpp | 25 ++++-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default.hpp | 25 ++++-
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_acquire_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_release_default.hpp | 8 -
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result.hpp | 6
   sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result_fwd.hpp | 9 -
   sandbox/SOC/2006/concurrency/trunk/libs/act/test/binary.cpp | 2
   sandbox/SOC/2006/concurrency/trunk/libs/act/test/project-root.jam | 2
   42 files changed, 477 insertions(+), 426 deletions(-)

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,8 +9,8 @@
 #ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_HPP
 #define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_HPP
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO add_assign
-
-#include <boost/act/interlocked/detail/binary_result_impl.hpp>
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_result.hpp>
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result.hpp>
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result.hpp>
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ACQ_RES_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ACQ_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( add_assign, acquire )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASS_AC_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASS_AC_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct add_assign_acquire_result;
+
+} } }
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_REL_RES_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_REL_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( add_assign, release )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASS_RL_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASS_RL_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct add_assign_release_result;
+
+} } }
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASSIGN_RES_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASSIGN_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( add_assign, full_barrier )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result/add_assign_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASSIGN_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_ADD_ASSIGN_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct add_assign_result;
+
+} } }
+
+#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/add_assign_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,11 +9,8 @@
 #ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_FWD_HPP
 #define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_ADD_ASSIGN_RESULT_FWD_HPP
 
-namespace boost { namespace act { namespace interlocked {
-
-template< typename TargetType, typename OperandType = TargetType >
-struct add_assign_result;
-
-} } }
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_result_fwd.hpp>
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_acquire_result_fwd.hpp>
+#include <boost/act/interlocked/add_assign/add_assign_result/add_assign_release_result_fwd.hpp>
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_ACQUIRE_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_ACQUIRE_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( add_assign, acquire, + )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( add_assign, full_barrier, + )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_release_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_release_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/add_assign/detail/add_assign_release_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_RELEASE_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_ADD_ASSIGN_DETAIL_ADD_ASSIGN_RELEASE_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( add_assign, release, + )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -44,10 +44,8 @@
   typedef typename remove_volatile< TargetType >::type type;
   type const source = static_cast< type >( new_value );
 
- return detail::assign_impl< typename assign_result< TargetType >::type
- , type
- >
- ::execute( destination, source );
+ return detail::assign_impl
+ ::execute( destination, source );
 }
 
 template< typename TargetType, typename SourceType >

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/assign_acquire.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -46,7 +46,6 @@
   type const source = static_cast< type >( new_value );
 
   return detail::assign_acquire_impl
- < typename assign_result< TargetType >::type, type >
          ::execute( destination, source );
 
 }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -13,11 +13,14 @@
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_acquire_default_impl
 {
   template< typename LeftType, typename RightType >
- static ResultType execute( LeftType& left, RightType& right )
+ struct result : assign_impl::result< LeftType, RightType > {};
+
+ template< typename LeftType, typename RightType >
+ static typename result< LeftType, RightType >::type
+ execute( LeftType& left, RightType& right )
   {
     return interlocked::assign( left, right );
   }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_windows.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_windows.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_acquire_windows.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -22,25 +22,36 @@
 #else
 
 #include <boost/utility/enable_if.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
 template< typename ResultType, typename UnqualifiedType >
 struct assign_acquire_impl
 {
+ template< typename TargetType, typename OperandType >
+ struct result
+ : binary_interlocked_result_returns_old< assign_operation
+ , TargetType, OperandType
+ > {};
+
   template< typename LeftType, typename RightType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 4 )
- , ResultType
+ , result< LeftType, RightType >
>
   ::type
   execute( LeftType& left, RightType& right )
   {
- return ResultType
+ typedef typename result< LeftType, RightType >::type result_type;
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedExchangeAcquire
                ( reinterpret_cast< LONG volatile* >( &left )
@@ -53,17 +64,20 @@
 
   template< typename LeftType, typename RightType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 8 )
- , ResultType
+ , result< LeftType, RightType >
>
   ::type
   execute( LeftType& left, RightType& right )
   {
- return ResultType
+ typedef typename result< LeftType, RightType >::type result_type;
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedExchange64Acquire
                ( reinterpret_cast< LONGLONG volatile* >( &left )
@@ -75,13 +89,15 @@
   }
 
   template< typename LeftType, typename RightType >
- static
- ResultType
+ static typename result< LeftType, RightType >
   execute( LeftType*& left, RightType*& right )
   {
+ typedef typename result< LeftType*, RightType >::type result_type;
+ typedef typename remove_cv< LeftType* >::type unqualified_type;
+
     return ResultType
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedExchangePointerAcquire
                ( const_cast< void* volatile* >

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -16,7 +16,6 @@
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_default_impl
 {
   template< typename LeftType, typename RightType >

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign/detail/assign_windows.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -21,24 +21,38 @@
 
 #include <windows.h> // ToDo: Remove (forward declare functions)
 
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+
+#include <boost/act/interlocked/add_assign/detail/add_assign_operation.hpp>
+
+#include <boost/type_traits/remove_cv.hpp>
+
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_impl
 {
+ template< typename TargetType, typename OperandType >
+ struct result
+ : binary_interlocked_result_returns_old< assign_operation
+ , TargetType, OperandType
+ > {};
+
   template< typename LeftType, typename RightType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 4 )
- , ResultType
+ , result< LeftType, RightType >
>
   ::type
   execute( LeftType& left, RightType& right )
   {
- return ResultType
+ typedef typename result< LeftType, RightType >::type result_type;
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                BOOST_INTERLOCKED_EXCHANGE
                ( reinterpret_cast< LONG volatile* >( &left )
@@ -50,13 +64,15 @@
   }
 
   template< typename LeftType, typename RightType >
- static
- ResultType
+ static typename result< LeftType, RightType >::type
   execute( LeftType*& left, RightType*& right )
   {
- return ResultType
+ typedef typename result< LeftType*, RightType >::type result_type;
+ typedef typename remove_cv< LeftType* >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                BOOST_INTERLOCKED_EXCHANGE_POINTER
                ( const_cast< void* volatile* >
@@ -75,17 +91,20 @@
 
   template< typename LeftType, typename RightType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 8 )
- , ResultType
+ , result< LeftType, RightType >
>
   ::type
   execute( LeftType& left, RightType& right )
   {
- return ResultType
+ typedef typename result< LeftType, RightType >::type result_type;
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedExchange64
                ( reinterpret_cast< LONGLONG volatile* >( &left )

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -51,9 +51,6 @@
              old_value = static_cast< type >( expected_value );
 
   return detail::assign_if_was_impl
- < typename assign_if_was_result< TargetType >::type
- , type
- >
          ::execute( destination, source, old_value );
 }
 

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -54,9 +54,6 @@
   typedef typename assign_if_was_result< TargetType >::type result_type;
 
   return detail::assign_if_was_acquire_impl
- < typename assign_if_was_result< TargetType >::type
- , type
- >
          ::execute( destination, source, old_value );
 }
 

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/assign_if_was_release.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -54,9 +54,6 @@
   typedef typename assign_if_was_result< TargetType >::type result_type;
 
   return detail::assign_if_was_release_impl
- < typename assign_if_was_result< TargetType >::type
- , type
- >
          ::execute( destination, source, old_value );
 }
 

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -13,13 +13,14 @@
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_if_was_acquire_default_impl
 {
   template< typename LeftType, typename RightType, typename OldType >
- static ResultType execute( LeftType& left, RightType& right
- , OldType& old
- )
+ struct result : assign_if_was_impl::result< LeftType, RightType, OldType > {};
+
+ template< typename LeftType, typename RightType, typename OldType >
+ static typename result< LeftType, RightType, OldType >::type
+ execute( LeftType& left, RightType& right, OldType& old )
   {
     return interlocked::assign_if_was( left, right, old );
   }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_windows.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_windows.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_acquire_windows.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -22,27 +22,35 @@
 #else
 
 #include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
 template< typename ResultType, typename UnqualifiedType >
 struct assign_if_was_acquire_impl
 {
- typedef void type;
+ template< typename LeftType, typename RightType, typename OldType >
+ struct result : assign_if_was_interlocked_result_returns_old< LeftType > {};
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 4 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchangeAcquire
                ( reinterpret_cast< LONG volatile* >( &left )
@@ -56,17 +64,22 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 8 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchange64Acquire
                ( reinterpret_cast< LONGLONG volatile* >( &left )
@@ -81,12 +94,17 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- ResultType
+ typename result< LeftType, RightType, OldType >::type
   execute( LeftType*& left, RightType*& right, OldType*& old )
   {
- return ResultType
+ typedef typename result< LeftType*, RightType*, OldType* >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType* >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchangePointerAcquire
                ( const_cast< void* volatile* >

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -16,11 +16,12 @@
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
+// ToDo: Make better stub impl
+
 struct assign_if_was_default_impl
 {
   template< typename LeftType, typename RightType, typename ConditionType >
- static ResultType execute( LeftType&, RightType&, ConditionType& )
+ static void execute( LeftType&, RightType&, ConditionType& )
   {
     BOOST_MPL_ASSERT_MSG
     (

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -13,13 +13,14 @@
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_if_was_release_default_impl
 {
   template< typename LeftType, typename RightType, typename OldType >
- static ResultType execute( LeftType& left, RightType& right
- , OldType& old
- )
+ struct result : assign_if_was_impl::result< LeftType, RightType, OldType > {};
+
+ template< typename LeftType, typename RightType, typename OldType >
+ static typename result< LeftType, RightType, OldType >::type
+ execute( LeftType& left, RightType& right, OldType& old )
   {
     return interlocked::assign_if_was( left, right, old );
   }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_windows.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_windows.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_release_windows.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -22,27 +22,35 @@
 #else
 
 #include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
 template< typename ResultType, typename UnqualifiedType >
 struct assign_if_was_release_impl
 {
- typedef void type;
+ template< typename LeftType, typename RightType, typename OldType >
+ struct result : assign_if_was_interlocked_result_returns_old< LeftType > {};
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 4 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchangeRelease
                ( reinterpret_cast< LONG volatile* >( &left )
@@ -56,17 +64,22 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 8 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchange64Release
                ( reinterpret_cast< LONGLONG volatile* >( &left )
@@ -81,12 +94,17 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- ResultType
+ typename result< LeftType, RightType, OldType >::type
   execute( LeftType*& left, RightType*& right, OldType*& old )
   {
- return ResultType
+ typedef typename result< LeftType*, RightType*, OldType* >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType* >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchangePointerRelease
                ( const_cast< void* volatile* >

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_windows.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_windows.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/assign_if_was/detail/assign_if_was_windows.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -21,26 +21,35 @@
 
 #include <windows.h> // ToDo: Remove (forward declare functions)
 
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+
+#include <boost/type_traits/remove_cv.hpp>
+
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct assign_if_was_impl
 {
- typedef void type;
+ template< typename LeftType, typename RightType, typename OldType >
+ struct result : assign_if_was_interlocked_result_returns_old< LeftType > {};
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 4 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                BOOST_INTERLOCKED_COMPARE_EXCHANGE
                ( reinterpret_cast< LONG volatile* >( &left )
@@ -55,12 +64,17 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- ResultType
+ typename result< LeftType, RightType, OldType >::type
   execute( LeftType*& left, RightType*& right, OldType*& old )
   {
- return ResultType
+ typedef typename result< LeftType*, RightType*, OldType* >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType* >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER
                ( const_cast< void* volatile* >
@@ -81,17 +95,22 @@
 
   template< typename LeftType, typename RightType, typename OldType >
   static
- typename enable_if_c
+ typename lazy_enable_if_c
   <
     ( sizeof( LeftType ) == 8 )
- , ResultType
+ , result< LeftType, RightType, OldType >
>
   ::type
   execute( LeftType& left, RightType& right, OldType& old )
   {
- return ResultType
+ typedef typename result< LeftType, RightType, OldType >::type
+ result_type;
+
+ typedef typename remove_cv< LeftType >::type unqualified_type;
+
+ return result_type
            (
- static_cast< UnqualifiedType >
+ static_cast< unqualified_type >
              (
                InterlockedCompareExchange64
                ( reinterpret_cast< LONGLONG volatile* >( &left )

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -12,33 +12,45 @@
 #include <boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
 #include <boost/act/detail/prior.hpp>
+#include <boost/act/interlocked/decrement/detail/decrement_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct decrement_acquire_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< decrement_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
- ; ( new_value = assign_if_was_acquire( target
- , act::detail::prior( curr_value )
- , curr_value
- )
- .old_value()
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
+ ; ( new_value = assign_if_was_acquire
+ ( target
+ , act::detail::prior( curr_value )
+ , curr_value
+ )
+ .old_value()
             )
          != curr_value
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -12,33 +12,45 @@
 #include <boost/act/interlocked/assign_if_was/assign_if_was.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
 #include <boost/act/detail/prior.hpp>
+#include <boost/act/interlocked/decrement/detail/decrement_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct decrement_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< decrement_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
- ; ( new_value = assign_if_was( target
- , act::detail::prior( curr_value )
- , curr_value
- )
- .old_value()
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
+ ; ( new_value = assign_if_was
+ ( target
+ , act::detail::prior( curr_value )
+ , curr_value
+ )
+ .old_value()
             )
          != curr_value
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/decrement/detail/decrement_release_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -12,33 +12,45 @@
 #include <boost/act/interlocked/assign_if_was/assign_if_was_release.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
 #include <boost/act/detail/prior.hpp>
+#include <boost/act/interlocked/decrement/detail/decrement_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct decrement_release_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< decrement_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
- ; ( new_value = assign_if_was_release( target
- , act::detail::prior( curr_value )
- , curr_value
- )
- .old_value()
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
+ ; ( new_value = assign_if_was_release
+ ( target
+ , act::detail::prior( curr_value )
+ , curr_value
+ )
+ .old_value()
             )
          != curr_value
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Copied: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default.hpp (from r7071, /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp)
==============================================================================
--- /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -6,140 +6,25 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#error Improper incusion of interlocked implementation header. Contact Boost.
+#ifdef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_READY_FOR_CLEANUP
+//#error Improper incusion of interlocked implementation header. Contact Boost.
 #else
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/act/interlocked/detail/full_name.hpp>
-
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_HEADER
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_FULL_BARRIER
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_OP
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SEMANTICS
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_READY_FOR_CLEANUP
 #endif
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
-BOOST_PP_TUPLE_ELEM( 3, 0 \
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
- )
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER \
-BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_ \
- , BOOST_PP_TUPLE_ELEM \
- ( 3, 1 \
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
- ) \
- ) \
-== BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_full_barrier
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#include <boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp>
-#include <boost/act/interlocked/retrieve_fwd.hpp>
-
-#else
-
-#define BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- , BOOST_PP_CAT( / \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- ) \
-, _fwd.hpp> \
-)
-
-#include BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER
-
-#endif
-
-namespace boost { namespace act { namespace interlocked { namespace detail {
-
-template< typename ResultType, typename UnqualifiedType >
-struct BOOST_PP_CAT
- (
- BOOST_ACT_INTERLOCKED_DETAIL_FULL_NAME
- ( BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
- , BOOST_PP_TUPLE_ELEM( 3, 1
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
- )
- )
- , _default_impl
- )
-{
- template< typename TargetType, typename OperandType >
- static ResultType execute( TargetType& target, OperandType& operand )
- {
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
- UnqualifiedType new_value;
-
- for( UnqualifiedType curr_value = retrieve( target )
- ; ( new_value = assign_if_was
- ( target
- , curr_value
- BOOST_PP_TUPLE_ELEM
- ( 3, 2
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
- )
- operand
- , curr_value
- )
- .old_value()
- )
- != curr_value
- ; curr_value = new_value
- );
-
- return ResultType( new_value, operand );
-
-#else
-
- return BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME( target, operand );
-
 #endif
 
- }
-};
-
-} } } }
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_HPP
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_HPP
 
-#include <boost/act/interlocked/assign_if_was/assign_if_was.hpp>
-#include <boost/act/interlocked/retrieve.hpp>
-
-#else
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#define BOOST_ACT_INTERLOCKED_CURR_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- , BOOST_PP_CAT( / \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- ) \
-, .hpp> \
-)
-
-#include BOOST_ACT_INTERLOCKED_CURR_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_CURR_HEADER
-
-#endif
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT() \
+<boost/act/interlocked/detail/binary_default_dont_include.hpp>
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_dont_include.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,266 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO
+#error Improper incusion of interlocked implementation header. Contact Boost.
+#else
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/act/interlocked/detail/full_name.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+BOOST_PP_TUPLE_ELEM( 3, 0 \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
+ )
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SEMANTICS \
+BOOST_PP_TUPLE_ELEM( 3, 1 \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
+ )
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME \
+BOOST_ACT_INTERLOCKED_DETAIL_FULL_NAME \
+( BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+, BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SEMANTICS \
+)
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_OP \
+BOOST_PP_TUPLE_ELEM( 3, 2 \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
+ )
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_FULL_BARRIER \
+BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_ \
+ , BOOST_PP_TUPLE_ELEM \
+ ( 3, 1 \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
+ ) \
+ ) \
+== BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_full_barrier
+
+#if BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_FULL_BARRIER
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp>
+#include <boost/act/interlocked/retrieve_fwd.hpp>
+
+#else
+
+#define BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_INFO_FWD_HEADER() \
+BOOST_PP_CAT \
+( \
+ BOOST_PP_CAT( BOOST_PP_CAT \
+ ( <boost/act/interlocked/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ , BOOST_PP_CAT \
+ ( / \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ ) \
+, _fwd.hpp> \
+)
+
+#include BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_INFO_FWD_HEADER()
+
+#undef BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_INFO_FWD_HEADER
+
+#endif
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _default_impl
+ )
+{
+ template< typename TargetType, typename OperandType = TargetType >
+ struct result;
+
+ template< typename TargetType, typename OperandType >
+ static typename result< TargetType, OperandType >::type
+ execute( TargetType& target, OperandType& operand );
+};
+
+} } } }
+
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_IMPL_OPERATION_HEADER() \
+BOOST_PP_CAT \
+( \
+ BOOST_PP_CAT( BOOST_PP_CAT \
+ ( <boost/act/interlocked/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ , BOOST_PP_CAT \
+ ( /detail/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ ) \
+, _operation.hpp> \
+)
+
+#include BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_IMPL_OPERATION_HEADER()
+
+#undef BOOST_ACT_INTERLOCKED_BINARY_DEFAULT_IMPL_OPERATION_HEADER
+
+#if BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_FULL_BARRIER
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp>
+#include <boost/act/interlocked/retrieve_fwd.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+template< typename TargetType, typename OperandType >
+struct BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _default_impl
+ )
+ ::result
+ : binary_interlocked_result_returns_old // ToDo: Change to select
+ <
+ BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME
+ , _operation
+ )
+ , TargetType, OperandType
+ > {};
+
+template< typename TargetType, typename OperandType >
+typename BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _default_impl
+ )
+ ::result< TargetType, OperandType >::type
+BOOST_PP_CAT
+(
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+, _default_impl
+)
+::
+execute( TargetType& target, OperandType& operand )
+{
+ typedef typename remove_cv< TargetType >::type unqualified_type;
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = interlocked::retrieve( target )
+ ; ( new_value = interlocked::assign_if_was
+ ( target
+ , curr_value
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_OP
+ operand
+ , curr_value
+ )
+ .old_value()
+ )
+ != curr_value
+ ; curr_value = new_value
+ );
+
+ typedef typename typename result< TargetType, OperandType >::type
+ result_type;
+
+ // Note: new_value is the old value here
+ return result_type( new_value, operand );
+}
+
+} } } }
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_HEADER() BOOST_PP_NIL
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_READY_FOR_CLEANUP
+
+#include <boost/act/interlocked/assign_if_was/assign_if_was.hpp>
+#include <boost/act/interlocked/retrieve.hpp>
+
+#else
+
+#define BOOST_ACT_INTERLOCKED_DEFAULT_IS_FWD_HEADER() \
+BOOST_PP_CAT \
+( \
+ BOOST_PP_CAT( BOOST_PP_CAT \
+ ( <boost/act/interlocked/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ , BOOST_PP_CAT \
+ ( / \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ ) \
+, _fwd.hpp> \
+)
+
+#include BOOST_ACT_INTERLOCKED_DEFAULT_IS_FWD_HEADER()
+
+#undef BOOST_ACT_INTERLOCKED_DEFAULT_IS_FWD_HEADER
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+template< typename TargetType, typename OperandType >
+struct BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _default_impl
+ )
+ ::result
+ : BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME
+ , _impl
+ )
+ ::template result< TargetType, OperandType > {};
+
+template< typename TargetType, typename OperandType >
+typename BOOST_PP_CAT
+ (
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _default_impl
+ )
+ ::result< TargetType, OperandType >::type
+BOOST_PP_CAT
+(
+ BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+, _default_impl
+)
+::execute( TargetType& target, OperandType& operand )
+{
+ return interlocked
+ ::BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME( target
+ , operand
+ );
+
+}
+
+} } } }
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_HEADER() \
+BOOST_PP_CAT \
+( \
+ BOOST_PP_CAT( BOOST_PP_CAT \
+ ( <boost/act/interlocked/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ , BOOST_PP_CAT \
+ ( / \
+ , BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_SHORT_NAME \
+ ) \
+ ) \
+, .hpp> \
+)
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_READY_FOR_CLEANUP
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_IS_HEADER()
+
+#endif
+
+#endif

Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_default_impl.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
+++ (empty file)
@@ -1,145 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to the Boost Software
- License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-#ifndef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#error Improper incusion of interlocked implementation header. Contact Boost.
-#else
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/act/interlocked/detail/full_name.hpp>
-
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
-#endif
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
-BOOST_PP_TUPLE_ELEM( 3, 0 \
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
- )
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER \
-BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_ \
- , BOOST_PP_TUPLE_ELEM \
- ( 3, 1 \
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
- ) \
- ) \
-== BOOST_ACT_INTERLOCKED_DETAIL_AFFIX_full_barrier
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#include <boost/act/interlocked/assign_if_was/assign_if_was_fwd.hpp>
-#include <boost/act/interlocked/retrieve_fwd.hpp>
-
-#else
-
-#define BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- , BOOST_PP_CAT( / \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- ) \
-, _fwd.hpp> \
-)
-
-#include BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_CURR_FWD_HEADER
-
-#endif
-
-namespace boost { namespace act { namespace interlocked { namespace detail {
-
-template< typename ResultType, typename UnqualifiedType >
-struct BOOST_PP_CAT
- (
- BOOST_ACT_INTERLOCKED_DETAIL_FULL_NAME
- ( BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
- , BOOST_PP_TUPLE_ELEM( 3, 1
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
- )
- )
- , _default_impl
- )
-{
- template< typename TargetType, typename OperandType >
- static ResultType execute( TargetType& target, OperandType& operand )
- {
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
- UnqualifiedType new_value;
-
- for( UnqualifiedType curr_value = retrieve( target )
- ; ( new_value = assign_if_was
- ( target
- , curr_value
- BOOST_PP_TUPLE_ELEM
- ( 3, 2
- , BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
- )
- operand
- , curr_value
- )
- .old_value()
- )
- != curr_value
- ; curr_value = new_value
- );
-
- return ResultType( new_value, operand );
-
-#else
-
- return BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME( target, operand );
-
-#endif
-
- }
-};
-
-} } } }
-
-#if BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-
-#include <boost/act/interlocked/assign_if_was/assign_if_was.hpp>
-#include <boost/act/interlocked/retrieve.hpp>
-
-#else
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_CURR_SEMANTIC_ID_IS_FULL_BARRIER
-
-#define BOOST_ACT_INTERLOCKED_CURR_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- , BOOST_PP_CAT( / \
- , BOOST_ACT_INTERLOCKED_DETAIL_CURR_SHORT_NAME \
- ) \
- ) \
-, .hpp> \
-)
-
-#include BOOST_ACT_INTERLOCKED_CURR_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_CURR_HEADER
-
-#endif
-
-#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -26,6 +26,8 @@
 
 #include <boost/type_traits/remove_volatile.hpp>
 
+#include <boost/act/interlocked/detail/impl_meta.hpp>
+
 #define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_FORWARDER_IS_ADDITIVE \
 BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_BINARY_FORWARDER_AFFIX_ \
             , BOOST_PP_TUPLE_ELEM \
@@ -66,7 +68,7 @@
 , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_SHORT_NAME
               , _result
               )
- < TargetType >
+ < TargetType, OperandType const >
>
 ::type
 BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME( TargetType& target
@@ -81,11 +83,13 @@
                    < TargetType >
                    ::type result_type;
 
- return detail::BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME
- , _impl
- )
- < result_type
- , type
+ return detail::impl_meta
+ <
+ detail::BOOST_PP_CAT
+ ( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME
+ , _impl
+ )
+ , TargetType
>
          ::execute( target, operand );
 }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_forwarder_fwd_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -60,7 +60,7 @@
 , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_SHORT_NAME
               , _result
               )
- < TargetType >
+ < TargetType, OperandType const >
>
 ::type
 BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FWD_FULL_NAME( TargetType& target

Copied: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result.hpp (from r7071, /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp)
==============================================================================
--- /sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -6,75 +6,19 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
+#ifdef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_IS_READY_FOR_CLEANUP
 #error Improper incusion of interlocked implementation header. Contact Boost.
 #else
-
-#include <boost/act/interlocked/detail/cas_support.hpp>
-
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA
-
-#include <boost/act/interlocked/detail/interlocked_result.hpp>
-#include <boost/type_traits/remove_volatile.hpp>
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- ) \
-, BOOST_PP_CAT( /detail/ \
- , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- , _operation.hpp> \
- ) \
- ) \
-)
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- ) \
-, BOOST_PP_CAT( / \
- , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- , _result_fwd.hpp> \
- ) \
- ) \
-)
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER
-
-namespace boost { namespace act { namespace interlocked {
-
-template< typename TargetType, typename OperandType >
-struct BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO, _result )
-{
- typedef detail::binary_interlocked_result
- < detail::BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
- , _operation
- )
- , detail::BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_ARITHMETIC_RETURN
- , typename remove_volatile< TargetType >::type
- , OperandType
- >
- type;
-};
-
-} } }
-
-#else
-
-#include <boost/act/interlocked/detail/unsupported_result.hpp>
-
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_IS_READY_FOR_CLEANUP
 #endif
+#endif
+
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_HPP
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_HPP
 
-#undef BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT() \
+<boost/act/interlocked/detail/binary_result_dont_include.hpp>
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_dont_include.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+/*
+
+Note: If you are getting an error in this file, please post to the mailing list
+
+*/
+
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO
+#error Improper incusion of interlocked implementation header. Contact Boost.
+#else
+
+#include <boost/act/interlocked/detail/cas_support.hpp>
+
+#ifdef BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA
+
+#include <boost/preprocessor/cat.hpp>
+
+#include <boost/act/interlocked/detail/impl.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_INFO \
+BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_IMPL_BEGIN()
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_DECLARATION_HEADER() \
+BOOST_PP_CAT \
+( BOOST_PP_CAT \
+ ( BOOST_PP_CAT \
+ ( BOOST_PP_CAT \
+ ( BOOST_PP_CAT \
+ ( BOOST_PP_CAT \
+ ( <boost/act/interlocked/ \
+ , BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SHORT_NAME \
+ ) \
+ , / \
+ ) \
+ , BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SHORT_NAME \
+ ) \
+ , _result/ \
+ ) \
+ , BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME \
+ ) \
+, _result_fwd.hpp> \
+)
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_DECLARATION_HEADER()
+
+#undef BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_DECLARATION_HEADER
+
+#include <boost/act/interlocked/detail/result_meta.hpp>
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType >
+struct BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_FULL_NAME
+ , _result
+ )
+ : detail::result_meta
+ <
+ detail::BOOST_PP_CAT
+ ( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
+ , _impl
+ )
+ , TargetType, OperandType
+ > {};
+
+} } }
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_IS_READY_FOR_CLEANUP
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_IMPL_END()
+
+#else
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_IS_READY_FOR_CLEANUP
+
+// ToDo: Define a result which produces a compile-time error when instantiated.
+
+#endif
+
+#endif

Deleted: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/binary_result_impl.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
+++ (empty file)
@@ -1,80 +0,0 @@
-/*=============================================================================
- Copyright (c) 2006, 2007 Matthew Calabrese
-
- Use, modification and distribution is subject to the Boost Software
- License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-#ifndef BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
-#error Improper incusion of interlocked implementation header. Contact Boost.
-#else
-
-#include <boost/act/interlocked/detail/cas_support.hpp>
-
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_DATA
-
-#include <boost/act/interlocked/detail/interlocked_result.hpp>
-#include <boost/type_traits/remove_volatile.hpp>
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- ) \
-, BOOST_PP_CAT( /detail/ \
- , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- , _operation.hpp> \
- ) \
- ) \
-)
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_OP_HEADER
-
-#define BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER() \
-BOOST_PP_CAT \
-( \
- BOOST_PP_CAT( <boost/act/interlocked/ \
- , BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- ) \
-, BOOST_PP_CAT( / \
- , BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO \
- , _result_fwd.hpp> \
- ) \
- ) \
-)
-
-#include BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER()
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_FWD_HEADER
-
-namespace boost { namespace act { namespace interlocked {
-
-template< typename TargetType, typename OperandType >
-struct BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO, _result )
-{
- typedef detail::binary_interlocked_result
- < detail::BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
- , _operation
- )
- , detail::BOOST_ACT_INTERLOCKED_DETAIL_CAS_SUPPORT_ARITHMETIC_RETURN
- , typename remove_volatile< TargetType >::type
- , OperandType
- >
- type;
-};
-
-} } }
-
-#else
-
-#include <boost/act/interlocked/detail/unsupported_result.hpp>
-
-#endif
-
-#undef BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO
-
-#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -13,6 +13,7 @@
 #error Improper incusion of interlocked implementation header. Contact Boost.
 #else
 #undef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HEADER_RAW
+#undef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HAS_CUSTOM_IMPL
 #undef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SHORT_NAME
 #undef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SEMANTICS
 #undef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_begin_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_begin_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_begin_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -32,11 +32,34 @@
 , BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SEMANTICS \
 )
 
+#include <boost/act/interlocked/detail/cas_support.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HAS_CUSTOM_IMPL \
+BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL \
+( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SHORT_NAME \
+, BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SEMANTICS \
+)
+
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
+#if BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HAS_CUSTOM_IMPL
+
 struct BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME, _impl );
 
+#else
+
+struct BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
+ , _default_impl
+ );
+
+typedef BOOST_PP_CAT
+ ( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
+ , _default_impl
+ )
+ BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME, _impl );
+
+#endif
+
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_end_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_end_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_end_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -16,13 +16,9 @@
 #error Improper incusion of interlocked implementation header. Contact Boost.
 #else
 
-#include <boost/act/interlocked/detail/cas_support.hpp>
 #include <boost/preprocessor/cat.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_IS_READY_FOR_CLEANUP
-
-// ToDo: Make this 80 characters max (push to macro invocation)
-#if BOOST_ACT_INTERLOCKED_DETAIL_HAS_CUSTOM_IMPL( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SHORT_NAME, BOOST_ACT_INTERLOCKED_DETAIL_IMPL_SEMANTICS )
+#if BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HAS_CUSTOM_IMPL
 
 #define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HEADER_RAW() \
 BOOST_PP_CAT \
@@ -52,27 +48,6 @@
 
 #else
 
-namespace boost { namespace act { namespace interlocked { namespace detail {
-
-template< typename ResultType, typename UnqualifiedType >
-struct BOOST_PP_CAT
- ( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
- , _default_impl
- );
-
-template< typename ResultType, typename UnqualifiedType >
-struct BOOST_PP_CAT
- ( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
- , _impl
- )
- : BOOST_PP_CAT
- ( BOOST_ACT_INTERLOCKED_DETAIL_IMPL_FULL_NAME
- , _default_impl
- )
- < ResultType, UnqualifiedType > {};
-
-} } } }
-
 #define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HEADER_RAW() \
 BOOST_PP_CAT \
 ( \
@@ -101,6 +76,8 @@
 
 #endif
 
+#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_IS_READY_FOR_CLEANUP
+
 #include BOOST_ACT_INTERLOCKED_DETAIL_IMPL_HEADER_RAW()
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_meta.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/impl_meta.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_IMPL_META_HPP
+#define BOOST_ACT_INTERLOCKED_DETAIL_IMPL_META_HPP
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+// Note: This template exists to delay instantiation of the impl type such that
+// the definition of the impl type does not need to appear until after
+// the definition of a template which uses it.
+template< typename ImplType, typename DummyType >
+struct impl_meta : ImplType {};
+
+} } } }
+
+#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/interlocked_result.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/interlocked_result.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/interlocked_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -1,8 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
 #ifndef BOOST_ACT_INTERLOCKED_DETAIL_INTERLOCKED_RESULT_HPP
 #define BOOST_ACT_INTERLOCKED_DETAIL_INTERLOCKED_RESULT_HPP
 
 #include <boost/act/detail/execute_if.hpp>
 #include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/mpl/or.hpp>
@@ -69,6 +78,18 @@
   value_type value_m;
 };
 
+template< typename Operation, typename ValueType >
+class unary_interlocked_result_returns_old
+{
+private:
+ typedef typename remove_cv< ValueType >::type value_type;
+public:
+ typedef unary_interlocked_result< Operation, detail::old_value
+ , value_type
+ >
+ type;
+};
+
 template< typename Operation, typename ValueInfo
         , typename ValueType, typename OperandType = ValueType
>
@@ -118,6 +139,36 @@
   operand_type operand_m;
 };
 
+template< typename Operation
+ , typename ValueType, typename OperandType = ValueType
+ >
+struct binary_interlocked_result_returns_old
+{
+private:
+ typedef typename remove_cv< ValueType >::type value_type;
+ typedef typename remove_cv< OperandType >::type operand_type;
+public:
+ typedef binary_interlocked_result< Operation, detail::old_value
+ , value_type, operand_type
+ >
+ type;
+};
+
+template< typename Operation, typename ValueInfo
+ , typename ValueType, typename OperandType = ValueType
+ >
+struct binary_interlocked_result_returns_new
+{
+private:
+ typedef typename remove_cv< ValueType >::type value_type;
+ typedef typename remove_cv< OperandType >::type operand_type;
+public:
+ typedef binary_interlocked_result< Operation, detail::new_value
+ , value_type, operand_type
+ >
+ type;
+};
+
 template< typename ValueInfo, typename ValueType >
 class assign_if_was_interlocked_result
 {
@@ -159,6 +210,8 @@
                         , ()
                         );
 
+ // ToDo: Allow toggle for regular assert, not static assert
+
     return was_successful() ? attempted_new_value_m : result_m;
   }
 
@@ -186,6 +239,30 @@
              expected_value_m;
 };
 
+template< typename ValueType >
+class assign_if_was_interlocked_result_returns_old
+{
+private:
+ typedef typename remove_cv< ValueType >::type value_type;
+public:
+ typedef assign_if_was_interlocked_result< detail::old_value
+ , value_type
+ >
+ type;
+};
+
+template< typename ValueType >
+class assign_if_was_interlocked_result_returns_success
+{
+private:
+ typedef typename remove_cv< ValueType >::type value_type;
+public:
+ typedef assign_if_was_interlocked_result< detail::success_value
+ , value_type
+ >
+ type;
+};
+
 } } } }
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/result_meta.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/result_meta.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_DETAIL_RESULT_META_HPP
+#define BOOST_ACT_INTERLOCKED_DETAIL_RESULT_META_HPP
+
+namespace boost { namespace act { namespace interlocked { namespace detail {
+
+struct result_meta_void;
+
+template< typename ImplType
+ , typename Type0
+ , typename Type1 = result_meta_void, typename Type2 = result_meta_void
+ >
+struct result_meta
+ : ImplType::template result< Type0, Type1, Type2 >
+{
+};
+
+template< typename ImplType
+ , typename Type0, typename Type1
+ >
+struct result_meta< ImplType, Type0, Type1 >
+ : ImplType::template result< Type0, Type1 >
+{
+};
+
+template< typename ImplType
+ , typename Type0
+ >
+struct result_meta< ImplType, Type0 >
+ : ImplType::template result< Type0 >
+{
+};
+
+} } } }
+
+#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/detail/unary_forwarder_dont_include.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -24,6 +24,8 @@
 
 #include <boost/type_traits/remove_volatile.hpp>
 
+#include <boost/act/interlocked/detail/impl_meta.hpp>
+
 #include <boost/act/interlocked/detail/forwarder.hpp>
 
 #define BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_INFO \
@@ -57,11 +59,13 @@
                    < TargetType >
                    ::type result_type;
 
- return detail::BOOST_PP_CAT( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME
- , _impl
- )
- < result_type
- , type
+ return detail::impl_meta
+ <
+ detail::BOOST_PP_CAT
+ ( BOOST_ACT_INTERLOCKED_DETAIL_FORWARDER_FULL_NAME
+ , _impl
+ )
+ , TargetType
>
          ::execute( target );
 }

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -11,19 +11,30 @@
 
 #include <boost/act/interlocked/assign_if_was/assign_if_was_acquire.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
-#include <boost/act/detail/prior.hpp>
+#include <boost/act/detail/next.hpp>
+#include <boost/act/interlocked/increment/detail/increment_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct increment_acquire_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< increment_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
        ; ( new_value = assign_if_was_acquire( target
                                                , act::detail::next( curr_value )
                                                , curr_value
@@ -34,11 +45,11 @@
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -11,19 +11,30 @@
 
 #include <boost/act/interlocked/assign_if_was/assign_if_was.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
-#include <boost/act/detail/prior.hpp>
+#include <boost/act/detail/next.hpp>
+#include <boost/act/interlocked/increment/detail/increment_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct increment_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< increment_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
        ; ( new_value = assign_if_was( target
                                        , act::detail::next( curr_value )
                                        , curr_value
@@ -34,11 +45,11 @@
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/increment/detail/increment_release_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -11,19 +11,30 @@
 
 #include <boost/act/interlocked/assign_if_was/assign_if_was_release.hpp>
 #include <boost/act/interlocked/retrieve.hpp>
-#include <boost/act/detail/prior.hpp>
+#include <boost/act/detail/next.hpp>
+#include <boost/act/interlocked/increment/detail/increment_operation.hpp>
+#include <boost/act/interlocked/detail/interlocked_result.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 namespace boost { namespace act { namespace interlocked { namespace detail {
 
-template< typename ResultType, typename UnqualifiedType >
 struct increment_release_default_impl
 {
   template< typename TargetType >
- static ResultType execute( TargetType& target )
+ struct result
+ : detail::unary_interlocked_result_returns_old< increment_operation
+ , TargetType
+ > {};
+
+ template< typename TargetType >
+ static typename result< TargetType >::type execute( TargetType& target )
   {
- UnqualifiedType new_value;
+ typedef typename result< TargetType >::type result_type;
+ typedef typename remove_cv< TargetType >::type unqualified_type;
 
- for( UnqualifiedType curr_value = retrieve( target )
+ unqualified_type new_value;
+
+ for( unqualified_type curr_value = retrieve( target )
        ; ( new_value = assign_if_was_release( target
                                                , act::detail::next( curr_value )
                                                , curr_value
@@ -34,11 +45,11 @@
        ; curr_value = new_value
        );
 
- return new_value;
+ // Note: new_value is old value here
+ return result_type( new_value );
   }
 };
 
-
 } } } }
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_acquire_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_acquire_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_acquire_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_ACQUIRE_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_ACQUIRE_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( subtract_assign, acquire, - )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( subtract_assign, full_barrier, - )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_release_default.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_release_default.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/detail/subtract_assign_release_default.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,13 +9,11 @@
 #ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_RELEASE_DEFAULT_HPP
 #define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_DETAIL_SUB_ASSIGN_RELEASE_DEFAULT_HPP
 
-#ifdef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#undef BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO
-#endif
+#include <boost/act/interlocked/detail/binary_default.hpp>
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_DEFAULT_IMPL_INFO \
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT_INFO \
 ( subtract_assign, release, - )
 
-#include <boost/act/interlocked/detail/binary_default_impl.hpp>
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_DEFAULT()
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,8 +9,8 @@
 #ifndef BOOST_ACT_INTERLOCKED_SUBTRACT_ASSIGN_SUBTRACT_ASSIGN_RESULT_HPP
 #define BOOST_ACT_INTERLOCKED_SUBTRACT_ASSIGN_SUBTRACT_ASSIGN_RESULT_HPP
 
-#define BOOST_ACT_INTERLOCKED_DETAIL_RESULT_INFO subtract_assign
-
-#include <boost/act/interlocked/detail/binary_result_impl.hpp>
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result.hpp>
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result.hpp>
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result.hpp>
 
 #endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_ACQ_RES_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_ACQ_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( subtract_assign, acquire )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASS_AC_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASS_AC_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct subtract_assign_acquire_result;
+
+} } }
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_REL_RES_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_REL_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( subtract_assign, release )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASS_RL_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASS_RL_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct subtract_assign_release_result;
+
+} } }
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASSIGN_RES_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASSIGN_RES_HPP
+
+#include <boost/act/interlocked/detail/binary_result.hpp>
+
+#define BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT_INFO \
+( subtract_assign, full_barrier )
+
+#include BOOST_ACT_INTERLOCKED_DETAIL_BINARY_RESULT()
+
+#endif

Added: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006, 2007 Matthew Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASSIGN_RS_FWD_HPP
+#define BOOST_ACT_INTERLOCKED_SUB_ASSIGN_SUB_ASSIGN_RESULT_SUB_ASSIGN_RS_FWD_HPP
+
+namespace boost { namespace act { namespace interlocked {
+
+template< typename TargetType, typename OperandType = TargetType >
+struct subtract_assign_result;
+
+} } }
+
+#endif

Modified: sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result_fwd.hpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result_fwd.hpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/boost/act/interlocked/subtract_assign/subtract_assign_result_fwd.hpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -9,11 +9,8 @@
 #ifndef BOOST_ACT_INTERLOCKED_SUBTRACT_ASSIGN_SUBTRACT_ASSIGN_RESULT_FWD_HPP
 #define BOOST_ACT_INTERLOCKED_SUBTRACT_ASSIGN_SUBTRACT_ASSIGN_RESULT_FWD_HPP
 
-namespace boost { namespace act { namespace interlocked {
-
-template< typename TargetType, typename OperandType = TargetType >
-struct subtract_assign_result;
-
-} } }
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_result_fwd.hpp>
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_acquire_result_fwd.hpp>
+#include <boost/act/interlocked/subtract_assign/subtract_assign_result/subtract_assign_release_result_fwd.hpp>
 
 #endif

Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/binary.cpp
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/binary.cpp (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/binary.cpp 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -86,6 +86,8 @@
     , BOOST_BINARY( 11110 10010 001001 ), BOOST_BINARY( 11 1000010 1100 111 )
     };
 
+
+// ToDo: Rewrite the following arrays using the preprocessor
 unsigned int const unsigned_ints_1_bit[2] =
 { BOOST_BINARY( 0 )
 , BOOST_BINARY( 1 )

Modified: sandbox/SOC/2006/concurrency/trunk/libs/act/test/project-root.jam
==============================================================================
--- sandbox/SOC/2006/concurrency/trunk/libs/act/test/project-root.jam (original)
+++ sandbox/SOC/2006/concurrency/trunk/libs/act/test/project-root.jam 2007-06-19 01:23:47 EDT (Tue, 19 Jun 2007)
@@ -43,7 +43,7 @@
 use-project /boost/unit_test : $(boost-root)/libs/test/build ;
 use-project /boost/boost_thread : $(boost-root)/libs/thread/build/ ;
 
-project act
+project act_build
     : requirements
         <include>$(boost-root)
         <include>$(act-include)


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