40 lines · 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//===----------------------------------------------------------------------===//8 9#ifndef _LIBCPP___TUPLE_IGNORE_H10#define _LIBCPP___TUPLE_IGNORE_H11 12#include <__config>13 14#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)15# pragma GCC system_header16#endif17 18#ifndef _LIBCPP_CXX03_LANG19 20_LIBCPP_BEGIN_NAMESPACE_STD21 22struct __ignore_type {23 template <class _Tp>24 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const __ignore_type& operator=(const _Tp&) const noexcept {25 return *this;26 }27};28 29# if _LIBCPP_STD_VER >= 1730inline constexpr __ignore_type ignore;31# else32constexpr __ignore_type ignore;33# endif34 35_LIBCPP_END_NAMESPACE_STD36 37#endif // _LIBCPP_CXX03_LANG38 39#endif // _LIBCPP___TUPLE_IGNORE_H40