This commit is contained in:
joaquintides
2022-10-21 11:13:13 +02:00
parent 2aa62c63c1
commit 8a3e5dd918

View File

@ -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;