// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 #pragma once #include #include "opentelemetry/version.h" #define OPENTELEMETRY_RETURN(...) \ noexcept(noexcept(__VA_ARGS__))->decltype(__VA_ARGS__) \ { \ return __VA_ARGS__; \ } OPENTELEMETRY_BEGIN_NAMESPACE namespace nostd { namespace detail { struct equal_to { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) == std::forward(rhs)) }; struct not_equal_to { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) != std::forward(rhs)) }; struct less { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) < std::forward(rhs)) }; struct greater { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) > std::forward(rhs)) }; struct less_equal { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) <= std::forward(rhs)) }; struct greater_equal { template inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const OPENTELEMETRY_RETURN(std::forward(lhs) >= std::forward(rhs)) }; } // namespace detail } // namespace nostd OPENTELEMETRY_END_NAMESPACE #undef OPENTELEMETRY_RETURN