1 /*============================================================================== 2 Copyright (c) 2005-2010 Joel de Guzman 3 Copyright (c) 2010 Thomas Heller 4 5 Distributed under the Boost Software License, Version 1.0. (See accompanying 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 ==============================================================================*/ 8 9 #include <boost/phoenix.hpp> 10 #include <boost/signals2.hpp> 11 12 struct s 13 { fs14 bool f(int, bool) { return true; } 15 }; 16 main()17int main() 18 { 19 s s_obj; 20 boost::signals2::signal<bool (int, bool)> sig; 21 sig.connect( 22 boost::phoenix::bind( 23 &s::f, &s_obj, 24 boost::phoenix::placeholders::arg1, 25 boost::phoenix::placeholders::arg2)); 26 } 27 28