Update valid method for throw_on_error

This commit is contained in:
ado 2023-07-16 20:26:09 +02:00
parent 5ab41c0315
commit 29c471e33a
3 changed files with 6 additions and 0 deletions

View File

@ -169,6 +169,8 @@ public:
bool valid() const {
if constexpr (string_error) {
return error_.empty();
} else if constexpr (throw_on_error) {
return true;
} else {
return !error_;
}

View File

@ -63,6 +63,8 @@ public:
bool valid() const {
if constexpr (string_error) {
return error_.empty();
} else if constexpr (throw_on_error) {
return true;
} else {
return !error_;
}

View File

@ -34,6 +34,8 @@ public:
bool valid() const {
if constexpr (string_error) {
return error_.empty();
} else if constexpr (throw_on_error) {
return true;
} else {
return !error_;
}