Compare commits

...

1 Commits

Author SHA1 Message Date
Aleksandr Orefkov e9eaa6c4cb Fix noexcept in find_or_throw 2026-08-05 14:36:02 +03:00
1 changed files with 1 additions and 1 deletions

View File

@ -3818,7 +3818,7 @@ public:
* @return size_t - the position of the beginning of the substring occurrence, or throws an Exc exception if not found.
*/
template<typename Exc, typename ... Args> requires std::is_constructible_v<Exc, Args...>
constexpr size_t find_or_throw(str_piece pattern, size_t offset = 0, Args&& ... args) const noexcept {
constexpr size_t find_or_throw(str_piece pattern, size_t offset = 0, Args&& ... args) const {
if (auto fnd = find(pattern.symbols(), pattern.length(), offset); fnd != str::npos) {
return fnd;
}