[libcxx-commits] [libcxx] [libc++] Optimize most of the __tree search algorithms (PR #155245)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 28 08:52:29 PDT 2025
================
@@ -0,0 +1,93 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___UTILITY_THREE_WAY_COMPARATOR_H
+#define _LIBCPP___UTILITY_THREE_WAY_COMPARATOR_H
+
+#include <__config>
+#include <__type_traits/desugars_to.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_arithmetic.h>
+#include <__type_traits/remove_const_ref.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _LHS, class _RHS, class = void>
+struct __default_three_way_comparator;
----------------
ldionne wrote:
Please add documentation explaining the purpose of this type, in particular the fact that this one is intended to be specialized by other types to provide their three-way comparison. Or if that's not the case because of the builtin, document that.
https://github.com/llvm/llvm-project/pull/155245
More information about the libcxx-commits
mailing list