forked from boostorg/unordered
added workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
This commit is contained in:
@ -21,7 +21,9 @@ struct move_only
|
||||
}
|
||||
};
|
||||
|
||||
template <> struct std::hash<move_only>
|
||||
namespace std{
|
||||
|
||||
template <> struct hash<move_only>
|
||||
{
|
||||
std::size_t operator()(move_only const& mo) const noexcept
|
||||
{
|
||||
@ -29,6 +31,8 @@ template <> struct std::hash<move_only>
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
struct raii_tracker
|
||||
{
|
||||
static int move_constructs;
|
||||
@ -59,7 +63,9 @@ struct raii_tracker
|
||||
}
|
||||
};
|
||||
|
||||
template <> struct std::hash<raii_tracker>
|
||||
namespace std{
|
||||
|
||||
template <> struct hash<raii_tracker>
|
||||
{
|
||||
std::size_t operator()(raii_tracker const& rt) const noexcept
|
||||
{
|
||||
@ -67,6 +73,8 @@ template <> struct std::hash<raii_tracker>
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
int raii_tracker::move_constructs = 0;
|
||||
int raii_tracker::copy_constructs = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user