The standard library neglects to implement basic operations for std::set
and std::map
like
set<T> set<T>::getUnion(set<T> other)
and
bool map<K,V>::contains(K key)
I know there are verbose and/or indirect workarounds for these methods but if I want my code to be maximally readable and expressive, I'm going to have to inherit from the STL, write my own Set
and Map
classes, and implement them myself. And yes, I'm aware of the sermonizing against doing this but the fact is the STL is incomplete.
I've done this but now I can't initialize my new classes using, e.g.,
Set<int> s = {1,2,3,4};
How do I inherit these initializers from the std
classes?