diff --git a/src/util/StringSplit.hxx b/src/util/StringSplit.hxx index 10eb86f9a..3a9c611d2 100644 --- a/src/util/StringSplit.hxx +++ b/src/util/StringSplit.hxx @@ -51,8 +51,7 @@ Partition(const std::basic_string_view haystack, } template -[[gnu::pure]] -std::pair, std::basic_string_view> +constexpr std::pair, std::basic_string_view> PartitionWithout(const std::basic_string_view haystack, const typename std::basic_string_view::size_type separator) noexcept { @@ -68,8 +67,7 @@ PartitionWithout(const std::basic_string_view haystack, * string and the second value is nullptr. */ template -[[gnu::pure]] -std::pair, std::basic_string_view> +constexpr std::pair, std::basic_string_view> Split(const std::basic_string_view haystack, const T ch) noexcept { const auto i = haystack.find(ch); @@ -85,8 +83,7 @@ Split(const std::basic_string_view haystack, const T ch) noexcept * value is the whole string and the second value is nullptr. */ template -[[gnu::pure]] -std::pair, std::basic_string_view> +constexpr std::pair, std::basic_string_view> SplitLast(const std::basic_string_view haystack, const T ch) noexcept { const auto i = haystack.rfind(ch);