47 lines
977 B
C++
47 lines
977 B
C++
|
|
#ifndef ACTIV_BOOST_MPL_MIN_MAX_HPP_INCLUDED
|
|
#define ACTIV_BOOST_MPL_MIN_MAX_HPP_INCLUDED
|
|
|
|
// Copyright Aleksey Gurtovoy 2000-2008
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
// See http://www.boost.org/libs/mpl for documentation.
|
|
|
|
// $Id$
|
|
// $Date$
|
|
// $Revision$
|
|
|
|
#include <ActivBoost/mpl/less.hpp>
|
|
#include <ActivBoost/mpl/if.hpp>
|
|
#include <ActivBoost/mpl/aux_/na_spec.hpp>
|
|
|
|
namespace Boost { namespace mpl {
|
|
|
|
template<
|
|
typename ACTIV_BOOST_MPL_AUX_NA_PARAM(N1)
|
|
, typename ACTIV_BOOST_MPL_AUX_NA_PARAM(N2)
|
|
>
|
|
struct min
|
|
: if_< less<N1,N2>,N1,N2 >
|
|
{
|
|
};
|
|
|
|
template<
|
|
typename ACTIV_BOOST_MPL_AUX_NA_PARAM(N1)
|
|
, typename ACTIV_BOOST_MPL_AUX_NA_PARAM(N2)
|
|
>
|
|
struct max
|
|
: if_< less<N1,N2>,N2,N1 >
|
|
{
|
|
};
|
|
|
|
ACTIV_BOOST_MPL_AUX_NA_SPEC(2, min)
|
|
ACTIV_BOOST_MPL_AUX_NA_SPEC(2, max)
|
|
|
|
}}
|
|
|
|
#endif // ACTIV_BOOST_MPL_MIN_MAX_HPP_INCLUDED
|