blob: 02d4c415156bbeea308caf6102ba5b065f5b16a7 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
Jeff Thompson3d613fd2013-10-15 15:39:04 -07002#ifndef NDNBOOST_MPL_PROTECT_HPP_INCLUDED
3#define NDNBOOST_MPL_PROTECT_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -07004
5// Copyright Peter Dimov 2001
6// Copyright Aleksey Gurtovoy 2002-2004
7//
8// Distributed under the Boost Software License, Version 1.0.
9// (See accompanying file LICENSE_1_0.txt or copy at
10// http://www.boost.org/LICENSE_1_0.txt)
11//
12// See http://www.boost.org/libs/mpl for documentation.
13
14// $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
15// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
16// $Revision: 49267 $
17
18#include <ndnboost/mpl/aux_/arity.hpp>
19#include <ndnboost/mpl/aux_/config/dtp.hpp>
20#include <ndnboost/mpl/aux_/nttp_decl.hpp>
21#include <ndnboost/mpl/aux_/na_spec.hpp>
22
23namespace ndnboost { namespace mpl {
24
25template<
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026 typename NDNBOOST_MPL_AUX_NA_PARAM(T)
Jeff Thompsona28eed82013-08-22 16:21:10 -070027 , int not_le_ = 0
28 >
29struct protect : T
30{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031#if NDNBOOST_WORKAROUND(__EDG_VERSION__, == 238)
Jeff Thompsona28eed82013-08-22 16:21:10 -070032 typedef mpl::protect type;
33#else
34 typedef protect type;
35#endif
36};
37
Jeff Thompson3d613fd2013-10-15 15:39:04 -070038#if defined(NDNBOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
Jeff Thompsona28eed82013-08-22 16:21:10 -070039namespace aux {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040template< NDNBOOST_MPL_AUX_NTTP_DECL(int, N), typename T >
Jeff Thompsona28eed82013-08-22 16:21:10 -070041struct arity< protect<T>, N >
42 : arity<T,N>
43{
44};
45} // namespace aux
46#endif
47
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048NDNBOOST_MPL_AUX_NA_SPEC_MAIN(1, protect)
49#if !defined(NDNBOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
50NDNBOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect)
Jeff Thompsona28eed82013-08-22 16:21:10 -070051#endif
52
53}}
54
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055#endif // NDNBOOST_MPL_PROTECT_HPP_INCLUDED