Warning: This file is not a C or C++ file. It does not have highlighting.
1 | // -*- C++ -*- |
---|---|
2 | //===----------------------------------------------------------------------===// |
3 | // |
4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | // See https://llvm.org/LICENSE.txt for license information. |
6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | // |
8 | //===----------------------------------------------------------------------===// |
9 | |
10 | #ifndef _LIBCPP___CXX03___ALGORITHM_FOR_EACH_H |
11 | #define _LIBCPP___CXX03___ALGORITHM_FOR_EACH_H |
12 | |
13 | #include <__cxx03/__algorithm/for_each_segment.h> |
14 | #include <__cxx03/__config> |
15 | #include <__cxx03/__iterator/segmented_iterator.h> |
16 | #include <__cxx03/__type_traits/enable_if.h> |
17 | #include <__cxx03/__utility/move.h> |
18 | |
19 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
20 | # pragma GCC system_header |
21 | #endif |
22 | |
23 | _LIBCPP_PUSH_MACROS |
24 | #include <__cxx03/__undef_macros> |
25 | |
26 | _LIBCPP_BEGIN_NAMESPACE_STD |
27 | |
28 | template <class _InputIterator, class _Function> |
29 | _LIBCPP_HIDE_FROM_ABI _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) { |
30 | for (; __first != __last; ++__first) |
31 | __f(*__first); |
32 | return __f; |
33 | } |
34 | |
35 | _LIBCPP_END_NAMESPACE_STD |
36 | |
37 | _LIBCPP_POP_MACROS |
38 | |
39 | #endif // _LIBCPP___CXX03___ALGORITHM_FOR_EACH_H |
40 |
Warning: This file is not a C or C++ file. It does not have highlighting.