polymorphic_value icon indicating copy to clipboard operation
polymorphic_value copied to clipboard

A polymorphic value-type for C++

Results 9 polymorphic_value issues
Sort by recently updated
recently updated
newest added

I made an implementation of a polymorphic_value with SBO. It has a very similar API as this incarnation but removes the possibility to take over ownership of an object already...

Make default constructor private. Make null-state only accessible via a move. Replace operator bool with valueless_by_move.

A buffer of known size can be used to store small objects and avoid use of indirect storage. See https://akrzemi1.wordpress.com/2014/04/14/common-optimizations/ This could be applied to `polymorphic_value`. Speed impact should be...

enhancement
implementation

The infrastructure that supports the `polymorphic_value::polymorphic_value(polymorphic_value&&)` constructor template (which is surprisingly heavy, given that repeated invocations build a linked list of type-conversion objects) could also be used to provide function...

Google Benchmark looks suitable for this: https://github.com/google/benchmark

enhancement

@jbcoe I assume this is an oversight on our part? Let me know and I can address this.