mirror of
https://github.com/Icinga/icinga2.git
synced 2025-05-21 15:00:18 +02:00
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();
|
||||
}
|
||||
|
||||
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 <boost/range/iterator.hpp>
|
||||
#include <boost/utility/string_view.hpp>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#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>;
|
||||
|
||||
namespace boost
|
||||
|
Loading…
x
Reference in New Issue
Block a user