Without using lambda how can I neatly create a function given an expression?
<p>Would like to be able to do something like</p>

<pre><code>std::map&lt;EventType, boost::function&lt;bool(int,int)&gt;  callbackMap;
callbackMap[EVENT1] = boost::bind( magic_creator( this-&gt;m_isHerp &amp;&amp; !this-&gt;m_isDerp ) , _1, _2 );
</code></pre>

<p>basically give an expression that evaluates to true or false to the magic_creator and it returns a function to which I can bind with boost. So in the above case, the magic_creator would create a function that would return true regardless of _1 and _2. I am not able to use lamdas as it is not avail to me. Anyone got anything for this?</p>

<p>P.S Assume callbackMap is part of some class and so is the current scope of the above code.</p>
