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_EXPERIMENTAL_ALGORITHM 11#define _LIBCPP_EXPERIMENTAL_ALGORITHM 12 13/* 14 experimental/algorithm synopsis 15 16#include <algorithm> 17 18namespace std { 19namespace experimental { 20inline namespace fundamentals_v1 { 21 22template <class ForwardIterator, class Searcher> 23ForwardIterator search(ForwardIterator first, ForwardIterator last, 24 const Searcher &searcher); 25 26// sample removed because it's now part of C++17 27 28} // namespace fundamentals_v1 29} // namespace experimental 30} // namespace std 31 32*/ 33 34#include <__assert> // all public C++ headers provide the assertion handler 35#include <__debug> 36#include <algorithm> 37#include <experimental/__config> 38#include <type_traits> 39 40#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 41# pragma GCC system_header 42#endif 43 44_LIBCPP_BEGIN_NAMESPACE_LFTS 45 46template <class _ForwardIterator, class _Searcher> 47_LIBCPP_INLINE_VISIBILITY 48_ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s) 49{ return __s(__f, __l).first; } 50 51_LIBCPP_END_NAMESPACE_LFTS 52 53#endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */ 54