Boost logo

Boost Users :

Subject: Re: [Boost-users] [Bimap][Function] Create a Boost.bimap of SDLKeys and Boost.functions
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-12-05 09:26:37


Den 05-12-2011 06:44, John M skrev:
> What is the correct syntax for creating a boost::bimap<SDLKey,
> boost::function<void(boost::shared_ptr<Player>, bool)> >?
>
> (SDLKey is part of the SDL library. It is an enumeration. See here
> http://www.libsdl.org/cgi/docwiki.cgi/SDLKey)
>
> 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.
>
> I could use some help overcoming this obstacle.

Is boost::function<T> less-than comparable?

This must be required for the reverse lookup when the function is used
as key.

-Thorsten


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