xref: /aosp_15_r20/external/libcxx/include/experimental/algorithm (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1*58b9f456SAndroid Build Coastguard Worker// -*- C++ -*-
2*58b9f456SAndroid Build Coastguard Worker//===-------------------------- algorithm ---------------------------------===//
3*58b9f456SAndroid Build Coastguard Worker//
4*58b9f456SAndroid Build Coastguard Worker//                     The LLVM Compiler Infrastructure
5*58b9f456SAndroid Build Coastguard Worker//
6*58b9f456SAndroid Build Coastguard Worker// This file is dual licensed under the MIT and the University of Illinois Open
7*58b9f456SAndroid Build Coastguard Worker// Source Licenses. See LICENSE.TXT for details.
8*58b9f456SAndroid Build Coastguard Worker//
9*58b9f456SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
10*58b9f456SAndroid Build Coastguard Worker
11*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM
12*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_EXPERIMENTAL_ALGORITHM
13*58b9f456SAndroid Build Coastguard Worker
14*58b9f456SAndroid Build Coastguard Worker/*
15*58b9f456SAndroid Build Coastguard Worker   experimental/algorithm synopsis
16*58b9f456SAndroid Build Coastguard Worker
17*58b9f456SAndroid Build Coastguard Worker#include <algorithm>
18*58b9f456SAndroid Build Coastguard Worker
19*58b9f456SAndroid Build Coastguard Workernamespace std {
20*58b9f456SAndroid Build Coastguard Workernamespace experimental {
21*58b9f456SAndroid Build Coastguard Workerinline namespace fundamentals_v1 {
22*58b9f456SAndroid Build Coastguard Worker
23*58b9f456SAndroid Build Coastguard Workertemplate <class ForwardIterator, class Searcher>
24*58b9f456SAndroid Build Coastguard WorkerForwardIterator search(ForwardIterator first, ForwardIterator last,
25*58b9f456SAndroid Build Coastguard Worker                       const Searcher &searcher);
26*58b9f456SAndroid Build Coastguard Worker
27*58b9f456SAndroid Build Coastguard Worker// sample removed because it's now part of C++17
28*58b9f456SAndroid Build Coastguard Worker
29*58b9f456SAndroid Build Coastguard Worker} // namespace fundamentals_v1
30*58b9f456SAndroid Build Coastguard Worker} // namespace experimental
31*58b9f456SAndroid Build Coastguard Worker} // namespace std
32*58b9f456SAndroid Build Coastguard Worker
33*58b9f456SAndroid Build Coastguard Worker*/
34*58b9f456SAndroid Build Coastguard Worker
35*58b9f456SAndroid Build Coastguard Worker#include <experimental/__config>
36*58b9f456SAndroid Build Coastguard Worker#include <algorithm>
37*58b9f456SAndroid Build Coastguard Worker#include <type_traits>
38*58b9f456SAndroid Build Coastguard Worker
39*58b9f456SAndroid Build Coastguard Worker#include <__debug>
40*58b9f456SAndroid Build Coastguard Worker
41*58b9f456SAndroid Build Coastguard Worker#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
42*58b9f456SAndroid Build Coastguard Worker#pragma GCC system_header
43*58b9f456SAndroid Build Coastguard Worker#endif
44*58b9f456SAndroid Build Coastguard Worker
45*58b9f456SAndroid Build Coastguard Worker_LIBCPP_PUSH_MACROS
46*58b9f456SAndroid Build Coastguard Worker#include <__undef_macros>
47*58b9f456SAndroid Build Coastguard Worker
48*58b9f456SAndroid Build Coastguard Worker
49*58b9f456SAndroid Build Coastguard Worker_LIBCPP_BEGIN_NAMESPACE_LFTS
50*58b9f456SAndroid Build Coastguard Worker
51*58b9f456SAndroid Build Coastguard Workertemplate <class _ForwardIterator, class _Searcher>
52*58b9f456SAndroid Build Coastguard Worker_LIBCPP_INLINE_VISIBILITY
53*58b9f456SAndroid Build Coastguard Worker_ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
54*58b9f456SAndroid Build Coastguard Worker{ return __s(__f, __l).first; }
55*58b9f456SAndroid Build Coastguard Worker
56*58b9f456SAndroid Build Coastguard Worker_LIBCPP_END_NAMESPACE_LFTS
57*58b9f456SAndroid Build Coastguard Worker
58*58b9f456SAndroid Build Coastguard Worker_LIBCPP_POP_MACROS
59*58b9f456SAndroid Build Coastguard Worker
60*58b9f456SAndroid Build Coastguard Worker#endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */
61