diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-24 21:43:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-24 22:46:25 +0200 |
commit | 3d58f3c0c22a972097956f781c51c2822e6d524f (patch) | |
tree | bf67a7f2f937ac7ce1048281cd2274af75086812 | |
parent | 4ec29bf35eceddbc015b0b2631cf80453f49c2de (diff) |
Use requires-clauses
Change-Id: I27c990f27023aba5e77c6b406d7dbdcc898054ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | sal/rtl/strtmpl.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index bb49cfaf0aa4..6414115d4174 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -229,12 +229,12 @@ sal_Int32 compare(S1 s1, S2 s2, Compare, Shorten_t shortenedLength) } // take advantage of builtin optimisations -template <typename C, std::enable_if_t<sizeof(C) == sizeof(wchar_t), int> = 0> +template <typename C> requires (sizeof(C) == sizeof(wchar_t)) sal_Int32 compare(null_terminated<C> s1, null_terminated<C> s2, CompareNormal, NoShortening) { return wcscmp(reinterpret_cast<wchar_t const*>(s1.p), reinterpret_cast<wchar_t const*>(s2.p)); } -template <typename C, std::enable_if_t<sizeof(C) == sizeof(char), int> = 0> +template <typename C> requires (sizeof(C) == sizeof(char)) sal_Int32 compare(null_terminated<C> s1, null_terminated<C> s2, CompareNormal, NoShortening) { return strcmp(reinterpret_cast<char const*>(s1.p), reinterpret_cast<char const*>(s2.p)); |