How to connect to any boost::signal with a void returning function?
Hi All,
I'm trying to connect a simple void returning function to multiple signals
of varying signature, I can see some references mentioning that it's
possible using boost::lambda::bind and boost::spirit::bind, But I keep
getting compilation errors, Is there something wrong with the following
code? Or is there a better way to do it? or is it not possible to do?
Boost version: Release 1.46.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include
I'm trying to connect a simple void returning function to multiple signals of varying signature, I can see some references mentioning that it's possible using boost::lambda::bind and boost::spirit::bind, But I keep getting compilation errors, Is there something wrong with the following code? Or is there a better way to do it? or is it not possible to do?
Sak, I have no idea what is a spirit or a phoenix, but your code compiles fine on my computer except for "undefined printf" which I commented out: gcc 4.5.3 boost 1.48 Chris
Hi Chris,
Doh, yes gave a try with boost 1.49 and it builds ok.
Thanks,
Sak
On Tue, Aug 14, 2012 at 5:01 PM, Chris Stankevitz wrote: I'm trying to connect a simple void returning function to multiple signals of varying signature, I can see some references mentioning that it's
possible using boost::lambda::bind and boost::spirit::bind, But I keep
getting compilation errors, Is there something wrong with the following
code? Or is there a better way to do it? or is it not possible to do? Sak, I have no idea what is a spirit or a phoenix, but your code compiles fine
on my computer except for "undefined printf" which I commented out: gcc 4.5.3
boost 1.48 Chris _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Tue, Aug 14, 2012 at 09:01:22AM -0700, Chris Stankevitz wrote:
I'm trying to connect a simple void returning function to multiple signals of varying signature, I can see some references mentioning that it's possible using boost::lambda::bind and boost::spirit::bind, But I keep getting compilation errors, Is there something wrong with the following code? Or is there a better way to do it? or is it not possible to do?
I have no idea what is a spirit or a phoenix, but your code compiles fine on my computer except for "undefined printf" which I commented out:
Assumedly he meant boost::phoenix::bind there, not 'spirit'. Boost.Phoenix is a library for composing functions and more, well more powerful than Boost.Bind and Boost.Lambda, originating from within Boost.Spirit, nowadays being a proper separate library. Boost.Spirit is a parser/generator library, full of goodness. -- Lars Viklund | zao@acc.umu.se
participants (3)
-
Chris Stankevitz
-
Lars Viklund
-
Sak