Path: blob/main/contrib/llvm-project/libcxx/include/__compare/compare_three_way.h
35262 views
// -*- C++ -*-1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_H10#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_H1112#include <__compare/three_way_comparable.h>13#include <__config>14#include <__utility/forward.h>1516#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)17# pragma GCC system_header18#endif1920_LIBCPP_BEGIN_NAMESPACE_STD2122#if _LIBCPP_STD_VER >= 202324struct _LIBCPP_TEMPLATE_VIS compare_three_way {25template <class _T1, class _T2>26requires three_way_comparable_with<_T1, _T2>27constexpr _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const28noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u))) {29return std::forward<_T1>(__t) <=> std::forward<_T2>(__u);30}3132using is_transparent = void;33};3435#endif // _LIBCPP_STD_VER >= 203637_LIBCPP_END_NAMESPACE_STD3839#endif // _LIBCPP___COMPARE_COMPARE_THREE_WAY_H404142