2 //===-------------------------- algorithm ---------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM
12 #define _LIBCPP_EXPERIMENTAL_ALGORITHM
15 experimental/algorithm synopsis
20 namespace experimental {
21 inline namespace fundamentals_v1 {
23 template <class ForwardIterator, class Searcher>
24 ForwardIterator search(ForwardIterator first, ForwardIterator last,
25 const Searcher &searcher);
27 // sample removed because it's now part of C++17
29 } // namespace fundamentals_v1
30 } // namespace experimental
35 #include <experimental/__config>
37 #include <type_traits>
41 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
42 #pragma GCC system_header
46 #include <__undef_macros>
49 _LIBCPP_BEGIN_NAMESPACE_LFTS
51 template <class _ForwardIterator, class _Searcher>
52 _LIBCPP_INLINE_VISIBILITY
53 _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
54 { return __s(__f, __l).first; }
56 _LIBCPP_END_NAMESPACE_LFTS
60 #endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */