Boost logo

Boost Users :

Subject: Re: [Boost-users] [Bimap][Function] Create a Boost.bimap of SDLKeys and Boost.functions
From: Nat Linden (nat_at_[hidden])
Date: 2011-12-05 09:32:33


On Mon, Dec 5, 2011 at 12:44 AM, John M <b1tn3wsr34d3r_at_[hidden]> wrote:

> What is the correct syntax for creating a boost::bimap<SDLKey,
> boost::function<void(boost::shared_ptr<Player>, bool)> >?
>
> The code above does not compile, generating long cryptic template-related
> errors.
>
> Using an std::map<SDLKey, boost::function<void(boost::shared_ptr<Player>,
> bool)> > works, however.

Yes, but does
std::map<boost::function<void(boost::shared_ptr<Player>, bool)>, SDLKey>
also compile? Both must be true to get bimap functionality.


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