Disables rvalue overload of scan_for_pattern

Prevents implicit conversions and unexpected behavior by deleting the rvalue overload of `scan_for_pattern`.
This commit is contained in:
2025-10-06 15:05:04 +03:00
parent 9868c832a1
commit e35d64b486

View File

@@ -39,6 +39,10 @@ namespace omath
static std::span<std::byte>::const_iterator scan_for_pattern(const std::span<std::byte>& range,
const std::string_view& pattern);
[[nodiscard]]
static std::span<std::byte>::const_iterator scan_for_pattern(std::span<std::byte>&& range,
const std::string_view& pattern) = delete;
template<class IteratorType>
requires std::input_or_output_iterator<std::remove_cvref_t<IteratorType>>
static IteratorType scan_for_pattern(const IteratorType& begin, const IteratorType& end,