xref: /freebsd-src/contrib/llvm-project/libcxx/include/__fwd/pair.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1bdd1243dSDimitry Andric //===---------------------------------------------------------------------===//
2bdd1243dSDimitry Andric //
3bdd1243dSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4bdd1243dSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5bdd1243dSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6bdd1243dSDimitry Andric //
7bdd1243dSDimitry Andric //===---------------------------------------------------------------------===//
8bdd1243dSDimitry Andric 
9bdd1243dSDimitry Andric #ifndef _LIBCPP___FWD_PAIR_H
10bdd1243dSDimitry Andric #define _LIBCPP___FWD_PAIR_H
11bdd1243dSDimitry Andric 
12bdd1243dSDimitry Andric #include <__config>
13*0fca6ea1SDimitry Andric #include <__fwd/tuple.h>
14*0fca6ea1SDimitry Andric #include <cstddef>
15bdd1243dSDimitry Andric 
16bdd1243dSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17bdd1243dSDimitry Andric #  pragma GCC system_header
18bdd1243dSDimitry Andric #endif
19bdd1243dSDimitry Andric 
20bdd1243dSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
21bdd1243dSDimitry Andric 
22bdd1243dSDimitry Andric template <class, class>
23bdd1243dSDimitry Andric struct _LIBCPP_TEMPLATE_VIS pair;
24bdd1243dSDimitry Andric 
25*0fca6ea1SDimitry Andric template <size_t _Ip, class _T1, class _T2>
26*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
27*0fca6ea1SDimitry Andric get(pair<_T1, _T2>&) _NOEXCEPT;
28*0fca6ea1SDimitry Andric 
29*0fca6ea1SDimitry Andric template <size_t _Ip, class _T1, class _T2>
30*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
31*0fca6ea1SDimitry Andric get(const pair<_T1, _T2>&) _NOEXCEPT;
32*0fca6ea1SDimitry Andric 
33*0fca6ea1SDimitry Andric #ifndef _LIBCPP_CXX03_LANG
34*0fca6ea1SDimitry Andric template <size_t _Ip, class _T1, class _T2>
35*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
36*0fca6ea1SDimitry Andric get(pair<_T1, _T2>&&) _NOEXCEPT;
37*0fca6ea1SDimitry Andric 
38*0fca6ea1SDimitry Andric template <size_t _Ip, class _T1, class _T2>
39*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
40*0fca6ea1SDimitry Andric get(const pair<_T1, _T2>&&) _NOEXCEPT;
41*0fca6ea1SDimitry Andric #endif
42*0fca6ea1SDimitry Andric 
43bdd1243dSDimitry Andric _LIBCPP_END_NAMESPACE_STD
44bdd1243dSDimitry Andric 
45bdd1243dSDimitry Andric #endif // _LIBCPP___FWD_PAIR_H
46