warning: enumeral and non-enumeral type in conditional expression

This commit is contained in:
木头云 2021-10-14 22:37:22 +08:00 committed by GitHub
parent 1c9569a90f
commit 74e871e6e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,7 +144,7 @@ public:
}
std::size_t conn_count() const noexcept {
return (elems_ == nullptr) ? invalid_value : elems_->conn_count();
return (elems_ == nullptr) ? static_cast<std::size_t>(invalid_value) : elems_->conn_count();
}
bool valid() const noexcept {