1 // Copyright 2008 Christophe Henry
2 // henry UNDERSCORE christophe AT hotmail DOT com
3 // This is an extended version of the state machine available in the boost::mpl library
4 // Distributed under the same license as the original.
5 // Copyright for the original version:
6 // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
7 // under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_MSM_BACK_BIND_HELPERS_H
12 #define BOOST_MSM_BACK_BIND_HELPERS_H
16 namespace boost { namespace msm { namespace back
18 // helper to replace std::plus as the lack of implicit conversion makes it not usable in one of our bind
19 template<class _Ty,class _Tz>
22 typedef _Ty first_argument_type;
23 typedef _Tz second_argument_type;
24 typedef _Ty result_type;
26 // functor for operator+
27 _Ty operator()( _Ty _Left, _Tz _Right) const
29 // apply operator+ to operands
30 return (_Left + _Right);
33 // helper to dereference a pointer to a function pointer
37 typedef T& result_type;
38 T& operator()(T* f) const
43 } } }//boost::msm::back
44 #endif //BOOST_MSM_BACK_BIND_HELPERS_H