Re: g_hash_table



On Fri, Feb 22, 2013 at 11:41 PM, John Emmas <johne53 tiscali co uk> wrote:
Today I downloaded the latest source code, assuming that g_hash_table would be implemented by now but it still seems to be missing.  I just wondered if there's a reason?  Isn't 'g_hash_table' suitable for incorporating into glibmm or is it just waiting on the TODO list?

This isn't a criticism BTW.  I'm just curious to know why it's missing.

I'm not a maintainer, but FWIW:
When glib might return a GList or something, Glibmm transforms it into a std::vector
or other STL container. I don't think any of the Glib containers are wrapped; if you are
thinking of using a GHashTable and are working in Glibmm, you should probably just
use a std::map or std::unordered_map.

If one wanted to wrap GHashTable, I imagine the maintainers would want to see
iterators and everything else you would expect from an STL container, which turns into
a much less trivial wrapping. And the end result is something that's already in the STL...
at least in C++11 or C++03 TR1.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]