Boost logo

Boost :

From: Marcus Tomlinson (themarcustomlinson_at_[hidden])
Date: 2024-11-29 11:58:00


I’m aware that the current implementation of any intentionally avoids copy assignments and uses only copy construction for all value updates. I believe this is due to the fact that copy assignment isn’t always available for all types - understandable.

My proposal is what if we had a separate “fast-any” type that does utilise copy assignment when types match. In my own usage of this new type, I’ve found massive (roughly 2x) performance improvement on consecutive assignments of the same type.

I’d like to gauge whether there would be any interest in adding such a type to the Boost library.

Source code: https://github.com/cross-platform/fast_any

Regards,
Marcus Tomlinson


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk