On June 8, 2015 12:12:12 PM EDT, James Armstrong
Have you considered to provide access to some kind of containers views
that behave like standard containers
Yes, there is a method container() which returns a pointer to the underlying container from which you can use any function designed for the STL containers.
Why would you return a pointer? Can it be null? If so, under what circumstances?
Now that you bring this up, having this makes pretty much everything else redundant.
Exactly
I think I will rename this to get
and have the interface be as you suggested...much simpler and easier to maintain. hv.get
().push_back(5);
That won't be as useful for non-numeric keys if you have associative containers.
for (auto itr = hv.get<double>().begin(); itr != hv.get<double>().end() ++itr) cout << *itr << "\n";
for (auto d : hv.get<double>()) { std::cout << d << '\n'; } ___ Rob (Sent from my portable computation engine)