martinzink commented on code in PR #1419:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1419#discussion_r1011666740


##########
libminifi/include/utils/StringUtils.h:
##########
@@ -37,6 +37,19 @@
 #include "utils/gsl.h"
 #include "utils/meta/detected.h"
 
+// libc++ doesn't define operator<=> on strings, and apparently the operator 
rewrite rules don't automagically make one
+#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 14000
+#include <compare>
+#endif
+
+#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 14000
+template<typename _CharT, typename _Traits, typename _Alloc>
+constexpr std::strong_ordering operator<=>(const std::basic_string<_CharT, 
_Traits, _Alloc>& __lhs,
+    const std::basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept {
+  return __lhs.compare(__rhs) <=> 0;
+}

Review Comment:
   good idea, I've simplified it in (we only need it for plain old std::string 
anyways) 
https://github.com/apache/nifi-minifi-cpp/pull/1419/commits/a4becde14199ad2b8f1354de64ed7dad5b6503dd#diff-82cfd335c88c846c59b1b3e46405088a59a5e85560dbb81bf5ebd5d7772457bdR44-R45



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to