Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
Algorithm.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Algorithm.h (C) 2000-2005 */
9/* */
10/* Algorithmes de la STL. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ALGORITHM_H
13#define ARCANE_ALGORITHM_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22#ifdef ARCANE_USE_OLD_STL
23# include <algo.h>
24# include <algobase.h>
25#else
26# include <algorithm>
27#endif
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32ARCANE_BEGIN_NAMESPACE
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37template<class Container,class Element> inline
38typename Container::const_iterator
39container_find(const Container& c,const Element& elem)
40{
41 typedef typename Container::const_iterator const_iterator;
42 const_iterator i = ARCANE_STD::find(c.begin(),c.end(),elem);
43 return i;
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49ARCANE_END_NAMESPACE
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
54#endif
55
Fichier de configuration d'Arcane.