mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
ircd::mods: Add comparison operator suite for module instance.
This commit is contained in:
parent
9c49e8bdb5
commit
e28a3d7f7a
1 changed files with 17 additions and 0 deletions
|
@ -14,6 +14,9 @@
|
|||
namespace ircd::mods
|
||||
{
|
||||
struct module;
|
||||
|
||||
bool operator<(const module &a, const module &b) noexcept;
|
||||
bool operator==(const module &a, const module &b) noexcept;
|
||||
}
|
||||
|
||||
struct ircd::mods::module
|
||||
|
@ -37,6 +40,20 @@ struct ircd::mods::module
|
|||
module(const string_view &name);
|
||||
};
|
||||
|
||||
inline bool
|
||||
ircd::mods::operator==(const module &a, const module &b)
|
||||
noexcept
|
||||
{
|
||||
return a.name() == b.name();
|
||||
}
|
||||
|
||||
inline bool
|
||||
ircd::mods::operator<(const module &a, const module &b)
|
||||
noexcept
|
||||
{
|
||||
return a.name() < b.name();
|
||||
}
|
||||
|
||||
inline
|
||||
ircd::mods::module::module(std::shared_ptr<mod> ptr)
|
||||
:std::shared_ptr<mod>{std::move(ptr)}
|
||||
|
|
Loading…
Add table
Reference in a new issue