Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===-------------------------- algorithm ---------------------------------===// |
| 3 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 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 |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM |
| 11 | #define _LIBCPP_EXPERIMENTAL_ALGORITHM |
| 12 | |
| 13 | /* |
| 14 | experimental/algorithm synopsis |
| 15 | |
| 16 | #include <algorithm> |
| 17 | |
| 18 | namespace std { |
| 19 | namespace experimental { |
| 20 | inline namespace fundamentals_v1 { |
| 21 | |
| 22 | template <class ForwardIterator, class Searcher> |
| 23 | ForwardIterator search(ForwardIterator first, ForwardIterator last, |
| 24 | const Searcher &searcher); |
Marshall Clow | 14082fc | 2018-02-01 16:36:08 +0000 | [diff] [blame] | 25 | |
| 26 | // sample removed because it's now part of C++17 |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 27 | |
| 28 | } // namespace fundamentals_v1 |
| 29 | } // namespace experimental |
| 30 | } // namespace std |
| 31 | |
| 32 | */ |
| 33 | |
| 34 | #include <experimental/__config> |
| 35 | #include <algorithm> |
| 36 | #include <type_traits> |
| 37 | |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 38 | #include <__debug> |
| 39 | |
| 40 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 41 | #pragma GCC system_header |
| 42 | #endif |
| 43 | |
Eric Fiselier | a016efb | 2017-05-31 22:07:49 +0000 | [diff] [blame] | 44 | _LIBCPP_PUSH_MACROS |
| 45 | #include <__undef_macros> |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 46 | |
| 47 | |
Eric Fiselier | a016efb | 2017-05-31 22:07:49 +0000 | [diff] [blame] | 48 | _LIBCPP_BEGIN_NAMESPACE_LFTS |
| 49 | |
Marshall Clow | 81416e4 | 2015-07-20 15:40:27 +0000 | [diff] [blame] | 50 | template <class _ForwardIterator, class _Searcher> |
| 51 | _LIBCPP_INLINE_VISIBILITY |
| 52 | _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s) |
Marshall Clow | 28cc4dd | 2016-03-08 15:12:52 +0000 | [diff] [blame] | 53 | { return __s(__f, __l).first; } |
Marshall Clow | 81416e4 | 2015-07-20 15:40:27 +0000 | [diff] [blame] | 54 | |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 55 | _LIBCPP_END_NAMESPACE_LFTS |
| 56 | |
Eric Fiselier | a016efb | 2017-05-31 22:07:49 +0000 | [diff] [blame] | 57 | _LIBCPP_POP_MACROS |
| 58 | |
Evgeniy Stepanov | 732e268 | 2015-05-13 16:55:41 +0000 | [diff] [blame] | 59 | #endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */ |