`PolymorphicValue` incurs some quite confusing requirements due to the clumsy way how the instance handling and copy support must be injected. As pointed out in #1197, with modern C++, this could be much simplified. An overhaul of `PolymorphicValue` seems urgent thus -- in the meanwhile we need to introduce more flexibiltiy with base-class template parameters, so that we can inject the CopySupport interface at usage site of the complete implementation class chain. Furthermore, the size of the VTable is added automatically to the storage requirements in `PolymorphicValue`, so we must subtract it when specifying the payload size by a compile-time expression based on `sizeof(ParamData<double>)` With these tweaks, we can now keep the limit of 4 «slots» (32 bytes) and still reserve 64bit for ID and type flags.
13 MiB
13 MiB
| The file is too large to be shown. |