commit | 90e23585a53ee181f5e9f5a4395b1c1c7b2909c6 | [log] [tgz] |
---|---|---|
author | Yingdi Yu <yuyingdi@gmail.com> | Thu Nov 06 14:21:04 2014 -0800 |
committer | Yingdi Yu <yuyingdi@gmail.com> | Thu Nov 06 19:15:48 2014 -0800 |
tree | 335b2560be54f421e73f7cc53f43a6092160fc4a | |
parent | 4e9b069bb844545d7e352b98821c5a11520f1b58 [diff] [blame] |
name: Add std::hash<Name> to support unordered_map container Change-Id: I1edda483340fc5a891b6ae3a9cc4baf39b859621 Refs: #2147
diff --git a/src/name.hpp b/src/name.hpp index f4b1411..1719e92 100644 --- a/src/name.hpp +++ b/src/name.hpp
@@ -597,4 +597,14 @@ } // namespace ndn +namespace std { +template<> +struct hash<ndn::Name> +{ + size_t + operator()(const ndn::Name& name) const; +}; + +} // namespace std + #endif