New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
replace_if.hpp in vendors/XIOS/current/extern/boost/include/boost/mpl – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/mpl/replace_if.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1
2#ifndef BOOST_MPL_REPLACE_IF_HPP_INCLUDED
3#define BOOST_MPL_REPLACE_IF_HPP_INCLUDED
4
5// Copyright Aleksey Gurtovoy 2000-2004
6// Copyright John R. Bandela 2000-2002
7// Copyright David Abrahams 2003-2004
8//
9// Distributed under the Boost Software License, Version 1.0.
10// (See accompanying file LICENSE_1_0.txt or copy at
11// http://www.boost.org/LICENSE_1_0.txt)
12//
13// See http://www.boost.org/libs/mpl for documentation.
14
15// $Id$
16// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
17// $Revision: 49267 $
18
19#include <boost/mpl/transform.hpp>
20#include <boost/mpl/apply.hpp>
21#include <boost/mpl/if.hpp>
22#include <boost/mpl/aux_/inserter_algorithm.hpp>
23#include <boost/mpl/aux_/config/forwarding.hpp>
24
25namespace boost { namespace mpl {
26
27namespace aux {
28
29template< typename Predicate, typename T >
30struct replace_if_op
31{
32    template< typename U > struct apply
33#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
34        : if_<
35              typename apply1<Predicate,U>::type
36            , T
37            , U
38            >
39    {
40#else
41    {
42        typedef typename if_<
43              typename apply1<Predicate,U>::type
44            , T
45            , U
46            >::type type;
47#endif
48    };
49};
50
51
52template<
53      typename Sequence
54    , typename Predicate
55    , typename T
56    , typename Inserter
57    >
58struct replace_if_impl
59    : transform1_impl<
60          Sequence
61        , protect< aux::replace_if_op<Predicate,T> >
62        , Inserter
63        >
64{
65};
66
67template<
68      typename Sequence
69    , typename Predicate
70    , typename T
71    , typename Inserter
72    >
73struct reverse_replace_if_impl
74    : reverse_transform1_impl<
75          Sequence
76        , protect< aux::replace_if_op<Predicate,T> >
77        , Inserter
78        >
79{
80};
81
82} // namespace aux
83
84BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace_if)
85
86}}
87
88#endif // BOOST_MPL_REPLACE_IF_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.