mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::conf: Explicit bool operators for std::string item.
This commit is contained in:
parent
7af8e5774c
commit
31aea230b1
1 changed files with 10 additions and 0 deletions
|
@ -168,6 +168,16 @@ struct ircd::conf::item<std::string>
|
|||
return _value;
|
||||
}
|
||||
|
||||
explicit operator bool() const
|
||||
{
|
||||
return !empty(_value);
|
||||
}
|
||||
|
||||
bool operator!() const
|
||||
{
|
||||
return !static_cast<bool>(*this);
|
||||
}
|
||||
|
||||
operator string_view() const
|
||||
{
|
||||
return _value;
|
||||
|
|
Loading…
Reference in a new issue