On 16-6-2014 17:23, Liam White wrote:
There are some more of these in util/unordered-containers.h:

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


And similar ones for boost and tr1 namespaces. These should also probably be removed.

This one is not a fwd declaration. It is defining the hash function for Glib::ustring to use the one for std::string for which the stdlib probably has an optimized version. The default hash function may be suboptimal for strings.

- Johan



On Fri, May 16, 2014 at 12:39 AM, Krzysztof Kosiński <tweenk.pl@...400...> wrote:
2014-05-15 23:47 GMT+02:00 Johan Engelen <jbc.engelen@...2592...>:
> Hi Krzysz,
>   The following lines in ui/tool/node.h are causing trouble with gcc 4.9
> C++11:
>
> #if HAVE_TR1_UNORDERED_SET
> namespace std {
> namespace tr1 {
> template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >;
> }
> }
> #endif
>
> Is it OK to remove those? If I comment them out, all seems to work fine. I
> cannot find the specialization definition anywhere, so seems only a fwd
> decl?

Looks like this is some kind of a leftover from something I didn't
finish and then forgot about it. If there is no definition, it can be
removed.

Regards, Krzysztof

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel