0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::conf: Explicit bool operators for std::string item.

This commit is contained in:
Jason Volk 2019-07-05 18:05:37 -07:00
parent 7af8e5774c
commit 31aea230b1

View file

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