Boost logo

Boost-Commit :

From: ahd6974-boostorg_at_[hidden]
Date: 2008-07-19 10:03:57


Author: andreas_huber69
Date: 2008-07-19 10:03:57 EDT (Sat, 19 Jul 2008)
New Revision: 47597
URL: http://svn.boost.org/trac/boost/changeset/47597

Log:
Yet another try at fixing the broken PingPong example.
Text files modified:
   trunk/libs/statechart/example/PingPong/Player.hpp | 20 ++++++++++++--------
   1 files changed, 12 insertions(+), 8 deletions(-)

Modified: trunk/libs/statechart/example/PingPong/Player.hpp
==============================================================================
--- trunk/libs/statechart/example/PingPong/Player.hpp (original)
+++ trunk/libs/statechart/example/PingPong/Player.hpp 2008-07-19 10:03:57 EDT (Sat, 19 Jul 2008)
@@ -74,7 +74,19 @@
 typedef sc::fifo_scheduler<> MyScheduler;
 #endif
 
+
+//////////////////////////////////////////////////////////////////////////////
+struct Player;
 struct Waiting;
+
+// The following class member specialization ensures that
+// state_machine<>::initiate is not instantiated at a point where Waiting
+// is not defined yet.
+template<>
+void sc::asynchronous_state_machine<
+ Player, Waiting, MyScheduler, MyAllocator >::initiate_impl() {}
+
+
 struct Player : sc::asynchronous_state_machine<
   Player, Waiting, MyScheduler, MyAllocator >
 {
@@ -104,13 +116,5 @@
 };
 
 
-// The following class member specialization ensures that
-// state_machine<>::initiate is not instantiated at a point where Waiting
-// is not defined yet.
-template<>
-void sc::asynchronous_state_machine<
- Player, Waiting, MyScheduler, MyAllocator >::initiate_impl() {}
-
-
 
 #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