Boost logo

Boost :

Subject: Re: [boost] Formal Review Request: TypeErasure
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2012-06-07 15:33:10

>> In a nutshell, concept-based-runtime-polymorphism/type-erasure allows
>> you to have runtime polymorphism while preserving value semantics.
>> The value of that win is very commonly underestimated.
>So, is there a language feature that could be added to C++17 that would make implementing type erasure easier?

Standardize Steven's library as part of the STL? Boost.Any is already being considered for standardization. I think Steven has proven we don't need a new core language feature and that this type safe type erasure can be done as a library. I suppose the question is, can this be done better with a change to the language itself? I suppose Concepts would make it easier, but that is like saying having a cornucopia would make eating breakfast easier. Living within the constraints of the linker I don't see how we can improve efficiency, but I haven't given it much thought. Perhaps we can identify things about the library that we don't like but have to live with and think about what language changes would be needed to deal with those things. Possibly Lorenzo's feedback about Base looking arbitrary and unintuitive? Once again, I haven't given it much thought.


Boost list run by bdawes at, gregod at, cpdaniel at, john at