From 29d26a1f9a349de957e20cf621603dd5e9fed9e2 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Mon, 14 Sep 2015 12:17:36 -0700 Subject: [PATCH] Fix namespace issues std:: template specialization --- libraries/networking/src/AssetClient.h | 2 ++ libraries/networking/src/Node.h | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/libraries/networking/src/AssetClient.h b/libraries/networking/src/AssetClient.h index 1f5a61dc55..6557954467 100644 --- a/libraries/networking/src/AssetClient.h +++ b/libraries/networking/src/AssetClient.h @@ -34,6 +34,8 @@ using ReceivedAssetCallback = std::function; using UploadResultCallback = std::function; + + class AssetClient : public QObject, public Dependency { Q_OBJECT public: diff --git a/libraries/networking/src/Node.h b/libraries/networking/src/Node.h index 5875295716..38d6678ba5 100644 --- a/libraries/networking/src/Node.h +++ b/libraries/networking/src/Node.h @@ -88,13 +88,15 @@ private: typedef QSharedPointer SharedNodePointer; Q_DECLARE_METATYPE(SharedNodePointer) -template<> -struct std::hash { - std::size_t operator()(const SharedNodePointer& p) const { - // Return the hash of the pointer - return std::hash()(p.data()); - } -}; +namespace std { + template<> + struct hash { + size_t operator()(const SharedNodePointer& p) const { + // Return the hash of the pointer + return hash()(p.data()); + } + }; +} QDebug operator<<(QDebug debug, const Node& node);