[wx-dev] #9532: Add support for TR1's unordered_map and
unordered_set
wxTrac
noreply at wxsite.net
Wed Jun 4 07:38:34 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9532>
#9532: Add support for TR1's unordered_map and unordered_set
----------------------------------------------------+-----------------------
Reporter: jan_van_dijk | Owner:
Type: build error | Status: new
Priority: normal | Milestone:
Component: base | Version: 2.9-svn
Keywords: TR1, hash map set unordered containers | Blockedby:
Patch: 1 | Blocking:
----------------------------------------------------+-----------------------
Compiling my wx-related code with gcc-4.3.x gives massive numbers of
warnings about the inclusion of deprecated headers. The culprits are
wx/hashmap.h and wx/hashset.h, which includes hash_map and hash_set.
The attached patch solves this problem by:
1) adding configure checks for the availability of <tr1/unordered_map>,
<tr1/unordered_set>. It adds (conditionally) #defines HAVE_TR1_HASH_MAP,
HAVE_TR1_HASH_SET to config.h
2) when these are available, these are used instead of the non-standard
hash_map, hash_set.
In the (near?) future, we will need additional checks for <unordered_map>,
<unordered_set>. The present patch anticipates these changes by using
additional indirection:it introduces additional defines HAVE_UNSORTED_MAP,
HAVE_UNSORTED_SET in the relevant header files, similar to what was
already done for hash_map, hash_set.
The patch was tested with an STL-enabled build on Linux/GTK.
When verified, please apply: the amount of warning messages is horrible,
and we wish to avoid-fno-deprecated. Thanks!
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9532>
More information about the wx-dev
mailing list