forked from boostorg/fusion
adds functional module
[SVN r36955]
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
// No include guard - this file is included multiple times intentionally.
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/fusion/support/detail/as_fusion_element.hpp>
|
||||
|
||||
#if !defined(BOOST_FUSION_CLASS_TPL_NAME)
|
||||
# error "BOOST_FUSION_CLASS_TPL_NAME undefined"
|
||||
#endif
|
||||
|
||||
#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME)
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename F>
|
||||
struct BOOST_FUSION_FUNC_NAME
|
||||
{
|
||||
typedef fusion::BOOST_FUSION_CLASS_TPL_NAME<
|
||||
typename fusion::detail::as_fusion_element<F>::type > type;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename F>
|
||||
inline typename result_of::BOOST_FUSION_FUNC_NAME<F>::type
|
||||
BOOST_FUSION_FUNC_NAME(F const & f)
|
||||
{
|
||||
return typename result_of::BOOST_FUSION_FUNC_NAME<F>::type(f);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#undef BOOST_FUSION_CLASS_TPL_NAME
|
||||
#undef BOOST_FUSION_FUNC_NAME
|
||||
|
18
include/boost/fusion/functional/generation/make_fused.hpp
Normal file
18
include/boost/fusion/functional/generation/make_fused.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/fused.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME fused
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/fused_function_object.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/fused_procedure.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/unfused_generic.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME unfused_generic
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME unfused_lvalue_args
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Use modification and distribution are subject to 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).
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
|
||||
|
||||
#define BOOST_FUSION_CLASS_TPL_NAME unfused_rvalue_args
|
||||
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user