source: mainline/uspace/lib/cpp/include/__bits/iterator_helpers.hpp@ e49d0ac

Last change on this file since e49d0ac was b57ba05, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Update headers in C++ files

  • Property mode set to 100644
File size: 1010 bytes
Line 
1/*
2 * SPDX-FileCopyrightText: 2018 Jaroslav Jindrak
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef LIBCPP_BITS_ITERATOR_HELPERS
8#define LIBCPP_BITS_ITERATOR_HELPERS
9
10#include <__bits/aux.hpp>
11
12namespace std::aux
13{
14 /**
15 * Used for our custom iterators where we know
16 * that their references/const_references and
17 * pointers/const_pointers differ only in constness.
18 */
19
20 template<class T>
21 struct get_non_const_ref
22 : type_is<T>
23 { /* DUMMY BODY */ };
24
25 template<class T>
26 struct get_non_const_ref<const T&>
27 : type_is<T&>
28 { /* DUMMY BODY */ };
29
30 template<class T>
31 using get_non_const_ref_t = typename get_non_const_ref<T>::type;
32
33 template<class T>
34 struct get_non_const_ptr
35 : type_is<T>
36 { /* DUMMY BODY */ };
37
38 template<class T>
39 struct get_non_const_ptr<const T*>
40 : type_is<T*>
41 { /* DUMMY BODY */ };
42
43 template<class T>
44 using get_non_const_ptr_t = typename get_non_const_ptr<T>::type;
45}
46
47#endif
Note: See TracBrowser for help on using the repository browser.