Boost logo

Boost Users :

Subject: Re: [Boost-users] [Statechart] Pass variable parameter to Player ctor?
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2012-05-10 09:03:12


Hi Dick

> In the PingPong example, I'm trying to pass a std::string variable to the
Player ctor through the fifo_schedular<>create_processor<>() in main(). No
joy. Error: no matching signature.
>
> I'm missing something obvious. I've stared at that first override in the
boost header and tried everything I could think of. Dead give away that I
don't understand: I'm "trying" things. %>[
>
> I'd sure appreciate it if someone could point me in the right direction. Are
there async examples that pass variables through create_processor() to the
ctorS?

Have you tried passing with boost::ref or boost::cref?

For an example, please see this test:

<http://www.boost.org/doc/libs/1_49_0/libs/statechart/test/FifoSchedulerTest.cp
p>

HTH,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap from 
the address shown in the header.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net