diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-11 15:33:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-12 09:34:07 +0200 |
commit | 92f3d912f703e3c84cbd9e0b43a34d12d130e3dd (patch) | |
tree | a7b302ea59761f5b77f567184eff3706e16158a1 /include | |
parent | 7bd401fa4e458c4ca16f7eb88289d50059e1d32e (diff) |
Fix typos in C++ feature test macros
...that were accidentally made in e6fe048ded34a322007547d4d31e32c598aa4993 "Some
more string_view use, add o3tl::starts/ends_with"
Change-Id: I06470f705d1f51f98daffabe544c0194dfc34ee3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157832
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/o3tl/string_view.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx index 07278be8e529..1e5db5eb0227 100644 --- a/include/o3tl/string_view.hxx +++ b/include/o3tl/string_view.hxx @@ -265,7 +265,7 @@ template <typename charT, typename traits = std::char_traits<charT>> constexpr bool ends_with(std::basic_string_view<charT, traits> sv, std::basic_string_view<charT, traits> x) noexcept { -#if defined __cpp_lib_ends_ends_with +#if defined __cpp_lib_starts_ends_with return sv.ends_with(x); #else return sv.size() >= x.size() @@ -275,7 +275,7 @@ constexpr bool ends_with(std::basic_string_view<charT, traits> sv, template <typename charT, typename traits = std::char_traits<charT>> constexpr bool ends_with(std::basic_string_view<charT, traits> sv, charT x) noexcept { -#if defined __cpp_lib_ends_ends_with +#if defined __cpp_lib_starts_ends_with return sv.ends_with(x); #else return !sv.empty() && traits::eq(sv.back(), x); @@ -284,7 +284,7 @@ constexpr bool ends_with(std::basic_string_view<charT, traits> sv, charT x) noex template <typename charT, typename traits = std::char_traits<charT>> constexpr bool ends_with(std::basic_string_view<charT, traits> sv, charT const* x) { -#if defined __cpp_lib_ends_ends_with +#if defined __cpp_lib_starts_ends_with return sv.ends_with(x); #else return ends_with(sv, std::basic_string_view<charT, traits>(x)); |