xref: /netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/std/algorithm (revision b1e838363e3c6fc78a55519254d99869742dd33c)
14fee23f9Smrg// <algorithm> -*- C++ -*-
24fee23f9Smrg
3*b1e83836Smrg// Copyright (C) 2001-2022 Free Software Foundation, Inc.
44fee23f9Smrg//
54fee23f9Smrg// This file is part of the GNU ISO C++ Library.  This library is free
64fee23f9Smrg// software; you can redistribute it and/or modify it under the
74fee23f9Smrg// terms of the GNU General Public License as published by the
84fee23f9Smrg// Free Software Foundation; either version 3, or (at your option)
94fee23f9Smrg// any later version.
104fee23f9Smrg
114fee23f9Smrg// This library is distributed in the hope that it will be useful,
124fee23f9Smrg// but WITHOUT ANY WARRANTY; without even the implied warranty of
134fee23f9Smrg// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
144fee23f9Smrg// GNU General Public License for more details.
154fee23f9Smrg
164fee23f9Smrg// Under Section 7 of GPL version 3, you are granted additional
174fee23f9Smrg// permissions described in the GCC Runtime Library Exception, version
184fee23f9Smrg// 3.1, as published by the Free Software Foundation.
194fee23f9Smrg
204fee23f9Smrg// You should have received a copy of the GNU General Public License and
214fee23f9Smrg// a copy of the GCC Runtime Library Exception along with this program;
224fee23f9Smrg// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
234fee23f9Smrg// <http://www.gnu.org/licenses/>.
244fee23f9Smrg
254fee23f9Smrg/*
264fee23f9Smrg *
274fee23f9Smrg * Copyright (c) 1994
284fee23f9Smrg * Hewlett-Packard Company
294fee23f9Smrg *
304fee23f9Smrg * Permission to use, copy, modify, distribute and sell this software
314fee23f9Smrg * and its documentation for any purpose is hereby granted without fee,
324fee23f9Smrg * provided that the above copyright notice appear in all copies and
334fee23f9Smrg * that both that copyright notice and this permission notice appear
344fee23f9Smrg * in supporting documentation.  Hewlett-Packard Company makes no
354fee23f9Smrg * representations about the suitability of this software for any
364fee23f9Smrg * purpose.  It is provided "as is" without express or implied warranty.
374fee23f9Smrg *
384fee23f9Smrg *
394fee23f9Smrg * Copyright (c) 1996,1997
404fee23f9Smrg * Silicon Graphics Computer Systems, Inc.
414fee23f9Smrg *
424fee23f9Smrg * Permission to use, copy, modify, distribute and sell this software
434fee23f9Smrg * and its documentation for any purpose is hereby granted without fee,
444fee23f9Smrg * provided that the above copyright notice appear in all copies and
454fee23f9Smrg * that both that copyright notice and this permission notice appear
464fee23f9Smrg * in supporting documentation.  Silicon Graphics makes no
474fee23f9Smrg * representations about the suitability of this software for any
484fee23f9Smrg * purpose.  It is provided "as is" without express or implied warranty.
494fee23f9Smrg */
504fee23f9Smrg
514fee23f9Smrg/** @file include/algorithm
524fee23f9Smrg *  This is a Standard C++ Library header.
534fee23f9Smrg */
544fee23f9Smrg
554fee23f9Smrg#ifndef _GLIBCXX_ALGORITHM
564fee23f9Smrg#define _GLIBCXX_ALGORITHM 1
574fee23f9Smrg
584fee23f9Smrg#pragma GCC system_header
594fee23f9Smrg
604fee23f9Smrg#include <bits/stl_algobase.h>
614fee23f9Smrg#include <bits/stl_algo.h>
62fb8a8121Smrg#if __cplusplus > 201703L
63fb8a8121Smrg# include <bits/ranges_algo.h>
64fb8a8121Smrg#endif
654fee23f9Smrg
66181254a7Smrg#if __cplusplus > 201402L
67181254a7Smrg// Parallel STL algorithms
68fb8a8121Smrg# if _PSTL_EXECUTION_POLICIES_DEFINED
69181254a7Smrg// If <execution> has already been included, pull in implementations
70181254a7Smrg#  include <pstl/glue_algorithm_impl.h>
71181254a7Smrg#  else
72181254a7Smrg// Otherwise just pull in forward declarations
73181254a7Smrg#    include <pstl/glue_algorithm_defs.h>
74fb8a8121Smrg#    define _PSTL_ALGORITHM_FORWARD_DECLARED 1
75181254a7Smrg#  endif
76181254a7Smrg
77181254a7Smrg// Feature test macro for parallel algorithms
78181254a7Smrg# define __cpp_lib_parallel_algorithm 201603L
79181254a7Smrg#endif // C++17
80181254a7Smrg
814fee23f9Smrg#ifdef _GLIBCXX_PARALLEL
824fee23f9Smrg# include <parallel/algorithm>
834fee23f9Smrg#endif
844fee23f9Smrg
854fee23f9Smrg#endif /* _GLIBCXX_ALGORITHM */
86