Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60744 - in sandbox/transaction/boost/transact: . detail
From: vicente.botet_at_[hidden]
Date: 2010-03-21 07:48:21


Author: viboes
Date: 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
New Revision: 60744
URL: http://svn.boost.org/trac/boost/changeset/60744

Log:
Boost.Transact:
* Add line at end of some files to avoid warning
* stub restart function
* add some include files that are needed
* Use __thread on GCC version GT 3.4 (Maybe this must be modified)
* Add no throw for some overrides of virtual functions
* Add friend to class transaction and use BOOST_NO_MEMBER_TEMPLATE_FRIENDS for compilers don't supporting this.

Text files modified:
   sandbox/transaction/boost/transact/basic_transaction.hpp | 5 ++++-
   sandbox/transaction/boost/transact/detail/static_tss.hpp | 2 +-
   sandbox/transaction/boost/transact/exception.hpp | 2 +-
   sandbox/transaction/boost/transact/simple_transaction_manager.hpp | 17 ++++++++++++++---
   sandbox/transaction/boost/transact/transaction.hpp | 2 +-
   sandbox/transaction/boost/transact/transaction_manager.hpp | 2 +-
   6 files changed, 22 insertions(+), 8 deletions(-)

Modified: sandbox/transaction/boost/transact/basic_transaction.hpp
==============================================================================
--- sandbox/transaction/boost/transact/basic_transaction.hpp (original)
+++ sandbox/transaction/boost/transact/basic_transaction.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -10,6 +10,7 @@
 #include <boost/noncopyable.hpp>
 #include <boost/transact/exception.hpp>
 #include <boost/assert.hpp>
+#include <iostream>
 
 namespace boost{
 namespace transact{
@@ -116,6 +117,8 @@
                 }
         }
 
+ void restart(){}
+
         /// \cond
 private:
         void pop(){
@@ -215,4 +218,4 @@
 
 
 
-#endif
\ No newline at end of file
+#endif

Modified: sandbox/transaction/boost/transact/detail/static_tss.hpp
==============================================================================
--- sandbox/transaction/boost/transact/detail/static_tss.hpp (original)
+++ sandbox/transaction/boost/transact/detail/static_tss.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -24,7 +24,7 @@
         static_thread_specific_ptr();
 public:
 
-#if defined(__GNUG__)
+#if ((__GNUC__== 3) && (__GNUC_MINOR__ > 4) || __GNUC__>= 4)
         static void reset(T *p=0){ ptr=p; }
         static T *get(){ return ptr; }
 private:

Modified: sandbox/transaction/boost/transact/exception.hpp
==============================================================================
--- sandbox/transaction/boost/transact/exception.hpp (original)
+++ sandbox/transaction/boost/transact/exception.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -90,7 +90,7 @@
                 detail::isolation_unwind_visitor<TxMgr,typename mpl::begin<typename TxMgr::resource_types>::type> visit;
                 visit(*this);
         }
- virtual ~isolation_exception(){}
+ virtual ~isolation_exception()throw (){}
 protected:
         isolation_exception(){}
 };

Modified: sandbox/transaction/boost/transact/simple_transaction_manager.hpp
==============================================================================
--- sandbox/transaction/boost/transact/simple_transaction_manager.hpp (original)
+++ sandbox/transaction/boost/transact/simple_transaction_manager.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -11,6 +11,8 @@
 #include <boost/utility/in_place_factory.hpp>
 #include <boost/optional/optional.hpp>
 #include <boost/transact/exception.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/transact/detail/static_tss.hpp>
 
 namespace boost{
 namespace transact{
@@ -31,7 +33,12 @@
                 class transaction_construct_t{
                         explicit transaction_construct_t(transaction *parent)
                                 : parent(parent){}
- friend class simple_transaction_manager;
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ template <class R, bool Th> friend class simple_transaction_manager;
+ friend class transaction;
+#else
+ public: // Should be private
+#endif
                         transaction *parent;
                 };
 
@@ -48,7 +55,11 @@
                                 }
                         }
                 private:
- friend class simple_transaction_manager;
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ template <class R, bool Th> friend class simple_transaction_manager;
+#else
+ public: // Should be private
+#endif
                         optional<typename Resource::transaction> rtx;
                         transaction * const parent;
                 };
@@ -142,4 +153,4 @@
 
 
 
-#endif
\ No newline at end of file
+#endif

Modified: sandbox/transaction/boost/transact/transaction.hpp
==============================================================================
--- sandbox/transaction/boost/transact/transaction.hpp (original)
+++ sandbox/transaction/boost/transact/transaction.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -39,4 +39,4 @@
 #define BOOST_TRANSACT_END_TRANSACTION_IN_LOOP \
         BOOST_TRANSACT_BASIC_END_TRANSACTION_IN_LOOP(boost::transact::transaction_manager)
 
-#endif
\ No newline at end of file
+#endif

Modified: sandbox/transaction/boost/transact/transaction_manager.hpp
==============================================================================
--- sandbox/transaction/boost/transact/transaction_manager.hpp (original)
+++ sandbox/transaction/boost/transact/transaction_manager.hpp 2010-03-21 07:48:20 EDT (Sun, 21 Mar 2010)
@@ -22,4 +22,4 @@
 }
 }
 
-#endif
\ No newline at end of file
+#endif


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