sal/rtl/strtmpl.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 3d58f3c0c22a972097956f781c51c2822e6d524f Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Oct 24 21:43:29 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Oct 24 22:46:25 2023 +0200 Use requires-clauses Change-Id: I27c990f27023aba5e77c6b406d7dbdcc898054ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158405 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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));