mirror of https://github.com/Icinga/icinga2.git
Allow hashmaps of String
This commit is contained in:
parent
449a3c14cf
commit
fd7ac4e5ca
|
@ -461,3 +461,8 @@ String::ConstIterator icinga::range_end(const String& x)
|
||||||
{
|
{
|
||||||
return x.End();
|
return x.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t std::hash<String>::operator()(const String& s) const noexcept
|
||||||
|
{
|
||||||
|
return std::hash<std::string>{}(s.GetData());
|
||||||
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "base/object.hpp"
|
#include "base/object.hpp"
|
||||||
#include <boost/range/iterator.hpp>
|
#include <boost/range/iterator.hpp>
|
||||||
#include <boost/utility/string_view.hpp>
|
#include <boost/utility/string_view.hpp>
|
||||||
|
#include <functional>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
|
||||||
|
@ -178,6 +179,12 @@ String::ConstIterator range_end(const String& x);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct std::hash<icinga::String>
|
||||||
|
{
|
||||||
|
std::size_t operator()(const icinga::String& s) const noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
extern template class std::vector<icinga::String>;
|
extern template class std::vector<icinga::String>;
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
|
|
Loading…
Reference in New Issue