2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM
11 #define _LIBCPP_EXPERIMENTAL_ALGORITHM
14 experimental/algorithm synopsis
19 namespace experimental {
20 inline namespace fundamentals_v1 {
22 template <class ForwardIterator, class Searcher>
23 ForwardIterator search(ForwardIterator first, ForwardIterator last,
24 const Searcher &searcher);
26 // sample removed because it's now part of C++17
28 } // namespace fundamentals_v1
29 } // namespace experimental
36 #include <experimental/__config>
37 #include <type_traits>
39 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
40 #pragma GCC system_header
43 _LIBCPP_BEGIN_NAMESPACE_LFTS
45 template <class _ForwardIterator, class _Searcher>
46 _LIBCPP_INLINE_VISIBILITY
47 _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
48 { return __s(__f, __l).first; }
50 _LIBCPP_END_NAMESPACE_LFTS
52 #endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */