Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2008-05-23 11:18:20


Author: anthonyw
Date: 2008-05-23 11:18:19 EDT (Fri, 23 May 2008)
New Revision: 45682
URL: http://svn.boost.org/trac/boost/changeset/45682

Log:
define intrusive_ptr_add_ref and intrusive_ptr_release at namespace scope rather than inline as friends in order to try and avoid compiler problems
Text files modified:
   trunk/boost/thread/win32/condition_variable.hpp | 30 +++++++++++++++++-------------
   1 files changed, 17 insertions(+), 13 deletions(-)

Modified: trunk/boost/thread/win32/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/win32/condition_variable.hpp (original)
+++ trunk/boost/thread/win32/condition_variable.hpp 2008-05-23 11:18:19 EDT (Fri, 23 May 2008)
@@ -46,21 +46,11 @@
                     notified=true;
                     detail::win32::ReleaseSemaphore(semaphore,count_to_release,0);
                 }
-
- friend void intrusive_ptr_add_ref(list_entry * p)
- {
- BOOST_INTERLOCKED_INCREMENT(&p->references);
- }
-
- friend void intrusive_ptr_release(list_entry * p)
- {
- if(!BOOST_INTERLOCKED_DECREMENT(&p->references))
- {
- delete p;
- }
- }
             };
 
+ friend void intrusive_ptr_add_ref(list_entry * p);
+ friend void intrusive_ptr_release(list_entry * p);
+
             typedef boost::intrusive_ptr<list_entry> entry_ptr;
             typedef std::vector<entry_ptr> generation_list;
 
@@ -245,6 +235,20 @@
             }
         
         };
+ void intrusive_ptr_add_ref(basic_condition_variable::list_entry * p)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&p->references);
+ }
+
+ void intrusive_ptr_release(basic_condition_variable::list_entry * p)
+ {
+ if(!BOOST_INTERLOCKED_DECREMENT(&p->references))
+ {
+ delete p;
+ }
+ }
+
+
     }
 
     class condition_variable:


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