codekingpro/portable-devtools
114k
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//===----------------------------------------------------------------------===//8 9#ifndef _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H10#define _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H11 12#ifndef __cuda_std__13#include <__config>14#endif // __cuda_std__15 16#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)17# pragma GCC system_header18#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)19# pragma clang system_header20#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)21# pragma system_header22#endif // no system header23 24_LIBCUDACXX_BEGIN_NAMESPACE_STD25 26#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)27 28template <class _Arg, class _Result>29struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 unary_function30{31 typedef _Arg argument_type;32 typedef _Result result_type;33};34 35#endif // _LIBCUDACXX_STD_VER <= 1436 37template <class _Arg, class _Result> struct __unary_function_keep_layout_base {38#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)39 using argument_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Arg;40 using result_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Result;41#endif42};43 44#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)45 46_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH47template <class _Arg, class _Result>48using __unary_function = unary_function<_Arg, _Result>;49_CCCL_DIAG_SUPPRESS_DEPRECATED_POP50 51#else52template <class _Arg, class _Result>53using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;54#endif55 56_LIBCUDACXX_END_NAMESPACE_STD57 58#endif // _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H59 