Update of /cvsroot/boost-sandbox/boost-sandbox/boost/statechart
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24677/boost/statechart
Modified Files:
event_base.hpp
Log Message:
Fixed an order of declaration issue (found on GCC3.4.2).
Index: event_base.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/statechart/event_base.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- event_base.hpp 18 Jun 2005 10:09:42 -0000 1.14
+++ event_base.hpp 15 Dec 2005 19:09:01 -0000 1.15
@@ -53,17 +53,7 @@
detail::counted_base<> > base_type;
public:
//////////////////////////////////////////////////////////////////////////
- intrusive_ptr< const event_base > intrusive_from_this() const
- {
- if ( base_type::ref_counted() )
- {
- return intrusive_ptr< const event_base >( this );
- }
- else
- {
- return clone();
- }
- }
+ intrusive_ptr< const event_base > intrusive_from_this() const;
protected:
//////////////////////////////////////////////////////////////////////////
@@ -107,6 +97,29 @@
#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
} // namespace statechart
#endif
+namespace statechart
+{
+
+
+
+// We're implementing this here so that GCC3.4.2 can find
+// intrusive_ptr_add_ref, which is indirectly called from the intrusive_ptr
+// ctor.
+inline intrusive_ptr< const event_base > event_base::intrusive_from_this() const
+{
+ if ( base_type::ref_counted() )
+ {
+ return intrusive_ptr< const event_base >( this );
+ }
+ else
+ {
+ return clone();
+ }
+}
+
+
+
+} // namespace statechart
} // namespace boost
|