diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-01-18 09:11:04 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-01-18 09:11:04 +0000 |
| commit | f12d6a57fe5cc18be5afd164061578d8e00d75ce (patch) | |
| tree | 7fd1a501a8a545fbf2326ead48cd041928699c5e /src/util | |
| parent | update to trunk (diff) | |
| parent | Fix missing embeded image condition, kindly caught by suv in bug #1270334 (diff) | |
| download | inkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.tar.gz inkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.zip | |
update to trunk
(bzr r11950.1.235)
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/unordered-containers.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/util/unordered-containers.h b/src/util/unordered-containers.h index 70d36c4dc..98c2fa3c9 100644 --- a/src/util/unordered-containers.h +++ b/src/util/unordered-containers.h @@ -19,8 +19,24 @@ #include <glibmm/ustring.h> #ifndef DOXYGEN_SHOULD_SKIP_THIS -#if defined(HAVE_TR1_UNORDERED_SET) +#if defined(HAVE_NATIVE_UNORDERED_SET) +# include <unordered_set> +# include <unordered_map> +# define INK_UNORDERED_SET std::unordered_set +# define INK_UNORDERED_MAP std::unordered_map +# define INK_HASH std::hash + +namespace std { +template <> +struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size_t> { + std::size_t operator()(Glib::ustring const &s) const { + return hash<std::string>()(s.raw()); + } +}; +} // namespace std + +#elif defined(HAVE_TR1_UNORDERED_SET) # include <tr1/unordered_set> # include <tr1/unordered_map> # define INK_UNORDERED_SET std::tr1::unordered_set |
