xref: /freebsd-src/contrib/llvm-project/libcxx/include/__tuple/ignore.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===//
2*0fca6ea1SDimitry Andric //
3*0fca6ea1SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0fca6ea1SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0fca6ea1SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0fca6ea1SDimitry Andric //
7*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===//
8*0fca6ea1SDimitry Andric 
9*0fca6ea1SDimitry Andric #ifndef _LIBCPP___TUPLE_IGNORE_H
10*0fca6ea1SDimitry Andric #define _LIBCPP___TUPLE_IGNORE_H
11*0fca6ea1SDimitry Andric 
12*0fca6ea1SDimitry Andric #include <__config>
13*0fca6ea1SDimitry Andric 
14*0fca6ea1SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15*0fca6ea1SDimitry Andric #  pragma GCC system_header
16*0fca6ea1SDimitry Andric #endif
17*0fca6ea1SDimitry Andric 
18*0fca6ea1SDimitry Andric #ifndef _LIBCPP_CXX03_LANG
19*0fca6ea1SDimitry Andric 
20*0fca6ea1SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
21*0fca6ea1SDimitry Andric 
22*0fca6ea1SDimitry Andric struct __ignore_type {
23*0fca6ea1SDimitry Andric   template <class _Tp>
24*0fca6ea1SDimitry Andric   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const __ignore_type& operator=(const _Tp&) const noexcept {
25*0fca6ea1SDimitry Andric     return *this;
26*0fca6ea1SDimitry Andric   }
27*0fca6ea1SDimitry Andric };
28*0fca6ea1SDimitry Andric 
29*0fca6ea1SDimitry Andric #  if _LIBCPP_STD_VER >= 17
30*0fca6ea1SDimitry Andric inline constexpr __ignore_type ignore;
31*0fca6ea1SDimitry Andric #  else
32*0fca6ea1SDimitry Andric constexpr __ignore_type ignore;
33*0fca6ea1SDimitry Andric #  endif
34*0fca6ea1SDimitry Andric 
35*0fca6ea1SDimitry Andric _LIBCPP_END_NAMESPACE_STD
36*0fca6ea1SDimitry Andric 
37*0fca6ea1SDimitry Andric #endif // _LIBCPP_CXX03_LANG
38*0fca6ea1SDimitry Andric 
39*0fca6ea1SDimitry Andric #endif // _LIBCPP___TUPLE_IGNORE_H
40