
On Feb 9, 2011, at 12:38 PM, Adarsh Soodan wrote:
I was curious if others have solved similar performance problems. I couldn't use boost::variant because I needed it for a message passing library where library user can pass in any message type. boost::variant would have been restrictive if the user wanted to use too many top level types of messages.
I would be interested in having boost::any (or some variation on it) providing small buffer optimization. That was done for boost::function back around boost 1.34, and something like that would work just fine for my usage. I've given the SBO for boost::any problem a cursory look, but have not yet demonstrated a sufficiently bad performance problem for use there to convince my managers that I should work on that rather than something else.