mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Remove BOOST_CONSTEXPR from searches. My level of knowledge about constexpr is too low to reason about the implications and create test cases.
This commit is contained in:
parent
24933c4409
commit
896577a68d
@ -210,7 +210,7 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find
|
// find
|
||||||
/*BOOST_CONSTEXPR*/ size_type find(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
size_type find(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
||||||
if (s.empty() && pos <= size())
|
if (s.empty() && pos <= size())
|
||||||
return pos;
|
return pos;
|
||||||
if (pos > size())
|
if (pos > size())
|
||||||
@ -219,75 +219,75 @@ namespace boost {
|
|||||||
s.cbegin (), s.cend (), traits::eq );
|
s.cbegin (), s.cend (), traits::eq );
|
||||||
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type find(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
size_type find(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
||||||
{ return find(basic_string_view(&c, 1), pos); }
|
{ return find(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type find(const charT* s, size_type pos, size_type n) const
|
size_type find(const charT* s, size_type pos, size_type n) const
|
||||||
{ return find(basic_string_view(s, n), pos); }
|
{ return find(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type find(const charT* s, size_type pos = 0) const
|
size_type find(const charT* s, size_type pos = 0) const
|
||||||
{ return find(basic_string_view(s), pos); }
|
{ return find(basic_string_view(s), pos); }
|
||||||
|
|
||||||
// rfind
|
// rfind
|
||||||
BOOST_CONSTEXPR size_type rfind(basic_string_view s, size_type pos = npos)
|
size_type rfind(basic_string_view s, size_type pos = npos)
|
||||||
const BOOST_NOEXCEPT {
|
const BOOST_NOEXCEPT {
|
||||||
const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
|
const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
|
||||||
s.crbegin (), s.crend (), traits::eq );
|
s.crbegin (), s.crend (), traits::eq );
|
||||||
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
|
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type rfind(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
size_type rfind(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
||||||
{ return rfind(basic_string_view(&c, 1), pos); }
|
{ return rfind(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type rfind(const charT* s, size_type pos, size_type n) const
|
size_type rfind(const charT* s, size_type pos, size_type n) const
|
||||||
{ return rfind(basic_string_view(s, n), pos); }
|
{ return rfind(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type rfind(const charT* s, size_type pos = npos) const
|
size_type rfind(const charT* s, size_type pos = npos) const
|
||||||
{ return rfind(basic_string_view(s), pos); }
|
{ return rfind(basic_string_view(s), pos); }
|
||||||
|
|
||||||
// find_first_of
|
// find_first_of
|
||||||
BOOST_CONSTEXPR size_type find_first_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
size_type find_first_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
||||||
const_iterator iter = std::find_first_of
|
const_iterator iter = std::find_first_of
|
||||||
( this->cbegin (), this->cend (), s.cbegin (), s.cend (), traits::eq );
|
( this->cbegin (), this->cend (), s.cbegin (), s.cend (), traits::eq );
|
||||||
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type find_first_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
size_type find_first_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
||||||
{ return find_first_of(basic_string_view(&c, 1), pos); }
|
{ return find_first_of(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_first_of(const charT* s, size_type pos, size_type n) const
|
size_type find_first_of(const charT* s, size_type pos, size_type n) const
|
||||||
{ return find_first_of(basic_string_view(s, n), pos); }
|
{ return find_first_of(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_first_of(const charT* s, size_type pos = 0) const
|
size_type find_first_of(const charT* s, size_type pos = 0) const
|
||||||
{ return find_first_of(basic_string_view(s), pos); }
|
{ return find_first_of(basic_string_view(s), pos); }
|
||||||
|
|
||||||
// find_last_of
|
// find_last_of
|
||||||
BOOST_CONSTEXPR size_type find_last_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
size_type find_last_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
||||||
const_reverse_iterator iter = std::find_first_of
|
const_reverse_iterator iter = std::find_first_of
|
||||||
( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
|
( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
|
||||||
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
|
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type find_last_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
size_type find_last_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
||||||
{ return find_last_of(basic_string_view(&c, 1), pos); }
|
{ return find_last_of(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_last_of(const charT* s, size_type pos, size_type n) const
|
size_type find_last_of(const charT* s, size_type pos, size_type n) const
|
||||||
{ return find_last_of(basic_string_view(s, n), pos); }
|
{ return find_last_of(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_last_of(const charT* s, size_type pos = npos) const
|
size_type find_last_of(const charT* s, size_type pos = npos) const
|
||||||
{ return find_last_of(basic_string_view(s), pos); }
|
{ return find_last_of(basic_string_view(s), pos); }
|
||||||
|
|
||||||
// find_first_not_of
|
// find_first_not_of
|
||||||
BOOST_CONSTEXPR size_type find_first_not_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
size_type find_first_not_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
||||||
const_iterator iter = find_not_of ( this->cbegin (), this->cend (), s );
|
const_iterator iter = find_not_of ( this->cbegin (), this->cend (), s );
|
||||||
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type find_first_not_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
size_type find_first_not_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
||||||
{ return find_first_not_of(basic_string_view(&c, 1), pos); }
|
{ return find_first_not_of(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos, size_type n) const
|
size_type find_first_not_of(const charT* s, size_type pos, size_type n) const
|
||||||
{ return find_first_not_of(basic_string_view(s, n), pos); }
|
{ return find_first_not_of(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos = 0) const
|
size_type find_first_not_of(const charT* s, size_type pos = 0) const
|
||||||
{ return find_first_not_of(basic_string_view(s), pos); }
|
{ return find_first_not_of(basic_string_view(s), pos); }
|
||||||
|
|
||||||
// find_last_not_of
|
// find_last_not_of
|
||||||
BOOST_CONSTEXPR size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
||||||
const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
|
const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
|
||||||
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
|
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
|
||||||
}
|
}
|
||||||
BOOST_CONSTEXPR size_type find_last_not_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
size_type find_last_not_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
||||||
{ return find_last_not_of(basic_string_view(&c, 1), pos); }
|
{ return find_last_not_of(basic_string_view(&c, 1), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos, size_type n) const
|
size_type find_last_not_of(const charT* s, size_type pos, size_type n) const
|
||||||
{ return find_last_not_of(basic_string_view(s, n), pos); }
|
{ return find_last_not_of(basic_string_view(s, n), pos); }
|
||||||
BOOST_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos = npos) const
|
size_type find_last_not_of(const charT* s, size_type pos = npos) const
|
||||||
{ return find_last_not_of(basic_string_view(s), pos); }
|
{ return find_last_not_of(basic_string_view(s), pos); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user