1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/mpl/is_placeholder.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,67 @@
1.4 +
1.5 +#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
1.6 +#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2001-2004
1.9 +//
1.10 +// Distributed under the Boost Software License, Version 1.0.
1.11 +// (See accompanying file LICENSE_1_0.txt or copy at
1.12 +// http://www.boost.org/LICENSE_1_0.txt)
1.13 +//
1.14 +// See http://www.boost.org/libs/mpl for documentation.
1.15 +
1.16 +// $Source: /cvsroot/boost/boost/boost/mpl/is_placeholder.hpp,v $
1.17 +// $Date: 2004/09/07 08:51:31 $
1.18 +// $Revision: 1.6 $
1.19 +
1.20 +#include <boost/mpl/arg_fwd.hpp>
1.21 +#include <boost/mpl/bool.hpp>
1.22 +#include <boost/mpl/aux_/yes_no.hpp>
1.23 +#include <boost/mpl/aux_/type_wrapper.hpp>
1.24 +#include <boost/mpl/aux_/nttp_decl.hpp>
1.25 +#include <boost/mpl/aux_/config/ctps.hpp>
1.26 +#include <boost/mpl/aux_/config/static_constant.hpp>
1.27 +
1.28 +namespace boost { namespace mpl {
1.29 +
1.30 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.31 +
1.32 +template< typename T >
1.33 +struct is_placeholder
1.34 + : bool_<false>
1.35 +{
1.36 +};
1.37 +
1.38 +template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
1.39 +struct is_placeholder< arg<N> >
1.40 + : bool_<true>
1.41 +{
1.42 +};
1.43 +
1.44 +#else
1.45 +
1.46 +namespace aux {
1.47 +
1.48 +aux::no_tag is_placeholder_helper(...);
1.49 +
1.50 +template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
1.51 +aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*);
1.52 +
1.53 +} // namespace aux
1.54 +
1.55 +template< typename T >
1.56 +struct is_placeholder
1.57 +{
1.58 + static aux::type_wrapper<T>* get();
1.59 + BOOST_STATIC_CONSTANT(bool, value =
1.60 + sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag)
1.61 + );
1.62 +
1.63 + typedef bool_<value> type;
1.64 +};
1.65 +
1.66 +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
1.67 +
1.68 +}}
1.69 +
1.70 +#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED