mirror of
https://github.com/boostorg/utility.git
synced 2025-05-08 18:34:02 +00:00
Corrected argument type in string_view/ref::at().
This commit is contained in:
parent
fe417f6237
commit
eb29d71245
@ -134,7 +134,7 @@ namespace boost {
|
||||
// element access
|
||||
BOOST_CONSTEXPR const charT& operator[](size_type pos) const { return ptr_[pos]; }
|
||||
|
||||
const charT& at(size_t pos) const {
|
||||
const charT& at(size_type pos) const {
|
||||
if ( pos >= len_ )
|
||||
BOOST_THROW_EXCEPTION( std::out_of_range ( "boost::string_ref::at" ) );
|
||||
return ptr_[pos];
|
||||
|
@ -128,7 +128,7 @@ namespace boost {
|
||||
// element access
|
||||
BOOST_CONSTEXPR const_reference operator[](size_type pos) const BOOST_NOEXCEPT { return ptr_[pos]; }
|
||||
|
||||
BOOST_CONSTEXPR const_reference at(size_t pos) const {
|
||||
BOOST_CONSTEXPR const_reference at(size_type pos) const {
|
||||
return pos >= len_ ? BOOST_THROW_EXCEPTION(std::out_of_range("boost::string_view::at")), ptr_[0] : ptr_[pos];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user