mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-14 07:23:26 +00:00
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:
@@ -39,6 +39,10 @@ namespace omath
|
|||||||
static std::span<std::byte>::const_iterator scan_for_pattern(const std::span<std::byte>& range,
|
static std::span<std::byte>::const_iterator scan_for_pattern(const std::span<std::byte>& range,
|
||||||
const std::string_view& pattern);
|
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>
|
template<class IteratorType>
|
||||||
requires std::input_or_output_iterator<std::remove_cvref_t<IteratorType>>
|
requires std::input_or_output_iterator<std::remove_cvref_t<IteratorType>>
|
||||||
static IteratorType scan_for_pattern(const IteratorType& begin, const IteratorType& end,
|
static IteratorType scan_for_pattern(const IteratorType& begin, const IteratorType& end,
|
||||||
|
|||||||
Reference in New Issue
Block a user