chigraph  master
Systems programming language written for beginners in LLVM
HashFilesystemPath.hpp
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #ifndef CHI_HASH_FILESYSTEM_PATH_HPP
6 #define CHI_HASH_FILESYSTEM_PATH_HPP
7 
8 #include <boost/filesystem.hpp>
9 #include <functional>
10 
11 namespace std {
12 
14 template <>
15 struct hash<boost::filesystem::path> {
19  size_t operator()(const boost::filesystem::path& p) const {
20  return std::hash<std::string>()(p.generic_string());
21  }
22 };
23 }
24 
25 #endif // CHI_HASH_FILESYSTEM_PATH_HPP
size_t operator()(const boost::filesystem::path &p) const
The hash fucntion.
STL namespace.