mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 19:41:29 +07:00
fix gcc build
This commit is contained in:
@@ -573,9 +573,14 @@ namespace meta_hpp::detail
|
||||
hashed_string& operator=(hashed_string&&) = default;
|
||||
hashed_string& operator=(const hashed_string&) = default;
|
||||
|
||||
constexpr hashed_string(const char* str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(std::string_view str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(const std::string& str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(const char* str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
constexpr hashed_string(std::string_view str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
hashed_string(const std::string& str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
constexpr void swap(hashed_string& other) noexcept {
|
||||
std::swap(hash_, other.hash_);
|
||||
@@ -609,7 +614,7 @@ namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<meta_hpp::detail::hashed_string> {
|
||||
constexpr size_t operator()(meta_hpp::detail::hashed_string hs) const noexcept {
|
||||
size_t operator()(meta_hpp::detail::hashed_string hs) const noexcept {
|
||||
return hs.get_hash();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,9 +50,14 @@ namespace meta_hpp::detail
|
||||
hashed_string& operator=(hashed_string&&) = default;
|
||||
hashed_string& operator=(const hashed_string&) = default;
|
||||
|
||||
constexpr hashed_string(const char* str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(std::string_view str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(const std::string& str) noexcept : hash_{fnv1a_hash(str)} {}
|
||||
constexpr hashed_string(const char* str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
constexpr hashed_string(std::string_view str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
hashed_string(const std::string& str) noexcept
|
||||
: hash_{fnv1a_hash(str)} {}
|
||||
|
||||
constexpr void swap(hashed_string& other) noexcept {
|
||||
std::swap(hash_, other.hash_);
|
||||
@@ -86,7 +91,7 @@ namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<meta_hpp::detail::hashed_string> {
|
||||
constexpr size_t operator()(meta_hpp::detail::hashed_string hs) const noexcept {
|
||||
size_t operator()(meta_hpp::detail::hashed_string hs) const noexcept {
|
||||
return hs.get_hash();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user