| 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-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef _LIBCPP___TUPLE_IGNORE_H |
| 10 |
#define _LIBCPP___TUPLE_IGNORE_H |
| 11 |
|
| 12 |
#include <__config> |
| 13 |
|
| 14 |
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 15 |
# pragma GCC system_header |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifndef _LIBCPP_CXX03_LANG |
| 19 |
|
| 20 |
_LIBCPP_BEGIN_NAMESPACE_STD |
| 21 |
|
| 22 |
struct __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 >= 17 |
| 30 |
inline constexpr __ignore_type ignore; |
| 31 |
# else |
| 32 |
constexpr __ignore_type ignore; |
| 33 |
# endif |
| 34 |
|
| 35 |
_LIBCPP_END_NAMESPACE_STD |
| 36 |
|
| 37 |
#endif // _LIBCPP_CXX03_LANG |
| 38 |
|
| 39 |
#endif // _LIBCPP___TUPLE_IGNORE_H |