I recently stumbles across some problem with initializer lists. Consider a program that stores map-like data
struct MyMapLike {
MyMapLike(std::map
Since I have a map-like class, and the initializer has the abstract value of a mapping-list, I would like to use the former version
And herin lies the problem: it's up to you to supply the constructors that allow your class to be treated like a map. You called your solution a work-around, but there's nothing to work around. :)
But I think this separate need of the constructor is dead ugly.
It is, but unfortunately since it's your class, you have to specify how the initializer lists work.