94 lines
2.8 KiB
C++
94 lines
2.8 KiB
C++
// Copyright Daniel Wallin 2006.
|
|
// 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)
|
|
|
|
#ifndef ACTIV_BOOST_PARAMETER_AUX_NAME_HPP
|
|
#define ACTIV_BOOST_PARAMETER_AUX_NAME_HPP
|
|
|
|
namespace Boost { namespace parameter { namespace aux {
|
|
|
|
struct name_tag_base
|
|
{
|
|
};
|
|
|
|
template <typename Tag>
|
|
struct name_tag
|
|
{
|
|
};
|
|
}}} // namespace Boost::parameter::aux
|
|
|
|
#include <ActivBoost/mpl/bool.hpp>
|
|
|
|
namespace Boost { namespace parameter { namespace aux {
|
|
|
|
template <typename T>
|
|
struct is_name_tag : ::Boost::mpl::false_
|
|
{
|
|
};
|
|
}}} // namespace Boost::parameter::aux
|
|
|
|
#include <ActivBoost/parameter/value_type.hpp>
|
|
#include <ActivBoost/mpl/placeholders.hpp>
|
|
#include <ActivBoost/config.hpp>
|
|
#include <ActivBoost/config/workaround.hpp>
|
|
|
|
#if !defined(ACTIV_BOOST_NO_SFINAE) && \
|
|
!ACTIV_BOOST_WORKAROUND(ACTIV_BOOST_BORLANDC, ACTIV_BOOST_TESTED_AT(0x592))
|
|
#include <ActivBoost/parameter/aux_/lambda_tag.hpp>
|
|
#include <ActivBoost/mpl/lambda.hpp>
|
|
#include <ActivBoost/mpl/bind.hpp>
|
|
#include <ActivBoost/mpl/quote.hpp>
|
|
#include <ActivBoost/core/enable_if.hpp>
|
|
|
|
namespace Boost { namespace mpl {
|
|
|
|
template <typename T>
|
|
struct lambda<
|
|
T
|
|
, typename ::Boost::enable_if<
|
|
::Boost::parameter::aux::is_name_tag<T>
|
|
, ::Boost::parameter::aux::lambda_tag
|
|
>::type
|
|
>
|
|
{
|
|
typedef ::Boost::mpl::true_ is_le;
|
|
typedef ::Boost::mpl::bind3<
|
|
::Boost::mpl::quote3< ::Boost::parameter::value_type>
|
|
, ::Boost::mpl::arg<2>
|
|
, T
|
|
, void
|
|
> result_;
|
|
typedef result_ type;
|
|
};
|
|
}} // namespace Boost::mpl
|
|
|
|
#endif // SFINAE enabled, not Borland.
|
|
|
|
#include <ActivBoost/parameter/aux_/void.hpp>
|
|
|
|
#define ACTIV_BOOST_PARAMETER_TAG_PLACEHOLDER_TYPE(tag) \
|
|
::Boost::parameter::value_type< \
|
|
::Boost::mpl::_2,tag,::Boost::parameter::void_ \
|
|
>
|
|
/**/
|
|
|
|
#if defined(ACTIV_BOOST_PARAMETER_CAN_USE_MP11)
|
|
#define ACTIV_BOOST_PARAMETER_TAG_MP11_PLACEHOLDER_VALUE(name, tag) \
|
|
template <typename ArgumentPack> \
|
|
using name = typename ::Boost::parameter \
|
|
::value_type<ArgumentPack,tag,::Boost::parameter::void_>::type
|
|
/**/
|
|
|
|
#include <ActivBoost/parameter/binding.hpp>
|
|
|
|
#define ACTIV_BOOST_PARAMETER_TAG_MP11_PLACEHOLDER_BINDING(name, tag) \
|
|
template <typename ArgumentPack> \
|
|
using name = typename ::Boost::parameter \
|
|
::binding<ArgumentPack,tag,::Boost::parameter::void_>::type
|
|
/**/
|
|
|
|
#endif // ACTIV_BOOST_PARAMETER_CAN_USE_MP11
|
|
#endif // include guard
|
|
|