Files
boost_mpl/include/boost/mpl/protect.hpp
T

56 lines
1.2 KiB
C++
Raw Normal View History

2002-09-15 22:13:24 +00:00
#ifndef BOOST_MPL_PROTECT_HPP_INCLUDED
#define BOOST_MPL_PROTECT_HPP_INCLUDED
2004-09-02 15:41:37 +00:00
// Copyright Peter Dimov 2001
// Copyright Aleksey Gurtovoy 2002-2004
//
// 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.
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
// $Source$
// $Date$
// $Revision$
#include <boost/mpl/aux_/arity.hpp>
#include <boost/mpl/aux_/config/dtp.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
namespace boost { namespace mpl {
2002-09-15 22:13:24 +00:00
2003-01-05 08:49:46 +00:00
template<
2004-09-02 15:41:37 +00:00
typename BOOST_MPL_AUX_NA_PARAM(T)
, int not_le_ = 0
2003-01-05 08:49:46 +00:00
>
2002-09-15 22:13:24 +00:00
struct protect : T
{
#if BOOST_WORKAROUND(__EDG_VERSION__, == 238)
2004-09-07 11:12:28 +00:00
typedef mpl::protect type;
#else
typedef protect type;
#endif
2002-09-15 22:13:24 +00:00
};
2004-09-02 15:41:37 +00:00
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
2002-10-07 11:32:25 +00:00
namespace aux {
2002-12-09 05:20:25 +00:00
template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T >
2002-10-07 11:32:25 +00:00
struct arity< protect<T>, N >
2002-09-15 22:13:24 +00:00
: arity<T,N>
2002-10-07 11:32:25 +00:00
{
2002-09-15 22:13:24 +00:00
};
2002-10-07 11:32:25 +00:00
} // namespace aux
2002-09-15 22:13:24 +00:00
#endif
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect)
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect)
2003-01-05 08:49:46 +00:00
#endif
2004-09-02 15:41:37 +00:00
}}
2002-09-15 22:13:24 +00:00
#endif // BOOST_MPL_PROTECT_HPP_INCLUDED