Add string_view::empty()
This commit is contained in:
@@ -56,6 +56,7 @@ namespace Opm {
|
||||
|
||||
inline char operator[]( size_t ) const;
|
||||
|
||||
inline bool empty() const;
|
||||
inline size_t size() const;
|
||||
inline size_t length() const;
|
||||
|
||||
@@ -158,6 +159,10 @@ namespace Opm {
|
||||
return *(this->begin() + i);
|
||||
}
|
||||
|
||||
inline bool string_view::empty() const {
|
||||
return std::distance( this->begin(), this->end() ) == 0;
|
||||
}
|
||||
|
||||
inline size_t string_view::size() const {
|
||||
return std::distance( this->begin(), this->end() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user