mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-02 15:20:57 +02:00
Compare commits
27 Commits
boost-1.40
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
7016e0fe37 | |||
575ce8ca26 | |||
d8d881ac6f | |||
399b268bf1 | |||
24f0323699 | |||
a8fe0fa44a | |||
814c40a093 | |||
7c74332487 | |||
e165418461 | |||
c51fc2ebee | |||
4a2214739c | |||
ef1e821173 | |||
af0e42f13e | |||
8506cd8be6 | |||
8b749bef46 | |||
91ea13a593 | |||
6d462cbd63 | |||
9a622b6904 | |||
f199472458 | |||
2c1a03f785 | |||
bcbd2ff112 | |||
67279d5c3d | |||
61bf0151da | |||
e9fd448376 | |||
300f35fadd | |||
6168061f97 | |||
9a1f176df2 |
@ -1,29 +0,0 @@
|
||||
#
|
||||
# Copyright Troy D. Straszheim
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See http://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
# This file was automatically generated from the original CMakeLists.txt file
|
||||
# Add a variable to hold the headers for the library
|
||||
set (lib_headers
|
||||
fusion
|
||||
)
|
||||
|
||||
# Add a library target to the build system
|
||||
boost_library_project(
|
||||
fusion
|
||||
# SRCDIRS
|
||||
# TESTDIRS
|
||||
HEADERS ${lib_headers}
|
||||
# DOCDIRS
|
||||
DESCRIPTION "Library for working with tuples, including various containers, algorithms, etc."
|
||||
MODULARIZED
|
||||
AUTHORS "Joel de Guzman <joel -at- boost-consulting.com>"
|
||||
"Dan Marsden <danmarsden -at- yahoo.co.uk>"
|
||||
"Tobias Schwinger <tschwinger -at- isonews2.com>"
|
||||
# MAINTAINERS
|
||||
)
|
||||
|
||||
|
@ -9,8 +9,6 @@ project boost/libs/fusion/doc ;
|
||||
import boostbook : boostbook ;
|
||||
using quickbook ;
|
||||
|
||||
path-constant images_location : html ;
|
||||
|
||||
boostbook quickbook
|
||||
:
|
||||
fusion.qbk
|
||||
@ -23,9 +21,5 @@ boostbook quickbook
|
||||
<xsl:param>toc.section.depth=3
|
||||
<xsl:param>toc.max.depth=3
|
||||
<xsl:param>generate.section.toc.level=4
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/fusion/doc/html
|
||||
<format>pdf:<xsl:param>img.src.path=$(images_location)/
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,13 @@ namespace boost { namespace fusion
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename detail::ref_result<element>::type type;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, detail::cref_result<element>
|
||||
, detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
@ -36,19 +42,6 @@ namespace boost { namespace fusion
|
||||
return v.at_impl(N());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Sequence, typename N>
|
||||
struct apply <Sequence const, N>
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename detail::cref_result<element>::type type;
|
||||
|
||||
static type
|
||||
call(Sequence const& v)
|
||||
{
|
||||
return v.at_impl(N());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
@ -25,12 +25,11 @@
|
||||
#include <boost/fusion/container/vector/vector50.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/find.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/facilities/intercept.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -39,23 +38,40 @@ namespace boost { namespace fusion
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct vector_n_chooser
|
||||
{
|
||||
typedef BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> type;
|
||||
};
|
||||
template <int N>
|
||||
struct get_vector_n;
|
||||
|
||||
template <>
|
||||
struct vector_n_chooser<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, void_ BOOST_PP_INTERCEPT)>
|
||||
struct get_vector_n<0>
|
||||
{
|
||||
typedef vector0 type;
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct call
|
||||
{
|
||||
typedef vector0 type;
|
||||
};
|
||||
};
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/vector/detail/vector_n_chooser.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, BOOST_PP_DEC(FUSION_MAX_VECTOR_SIZE))
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct vector_n_chooser
|
||||
{
|
||||
typedef
|
||||
mpl::BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)
|
||||
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
|
||||
input;
|
||||
|
||||
typedef typename mpl::begin<input>::type begin;
|
||||
typedef typename mpl::find<input, void_>::type end;
|
||||
typedef typename mpl::distance<begin, end>::type size;
|
||||
|
||||
typedef typename get_vector_n<size::value>::template
|
||||
call<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
|
||||
type;
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@ -69,12 +85,14 @@ namespace boost { namespace fusion { namespace detail
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
struct vector_n_chooser<
|
||||
BOOST_PP_ENUM_PARAMS(N, T)
|
||||
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(FUSION_MAX_VECTOR_SIZE, N), void_ BOOST_PP_INTERCEPT)>
|
||||
template <>
|
||||
struct get_vector_n<N>
|
||||
{
|
||||
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct call
|
||||
{
|
||||
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
};
|
||||
|
||||
#undef N
|
||||
|
@ -91,14 +91,14 @@ namespace boost { namespace fusion
|
||||
>::type
|
||||
at_c(Sequence& seq)
|
||||
{
|
||||
return fusion::at<mpl::int_<N> >(seq);
|
||||
return at<mpl::int_<N> >(seq);
|
||||
}
|
||||
|
||||
template <int N, typename Sequence>
|
||||
inline typename result_of::at_c<Sequence const, N>::type
|
||||
at_c(Sequence const& seq)
|
||||
{
|
||||
return fusion::at<mpl::int_<N> >(seq);
|
||||
return at<mpl::int_<N> >(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
|
@ -7,8 +7,12 @@
|
||||
#if !defined(FUSION_ACCESS_04182005_0737)
|
||||
#define FUSION_ACCESS_04182005_0737
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
@ -28,36 +32,23 @@ namespace boost { namespace fusion { namespace detail
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct non_ref_parameter
|
||||
{
|
||||
typedef typename boost::remove_cv<T>::type const& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_param
|
||||
{
|
||||
typedef T const& type;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_reference<T>
|
||||
, mpl::identity<T>
|
||||
, non_ref_parameter<T>
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_param<T &>
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_param<T const>
|
||||
{
|
||||
typedef T const& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_param<T volatile>
|
||||
{
|
||||
typedef T const& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_param<T const volatile>
|
||||
{
|
||||
typedef T const& type;
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
|
@ -1 +0,0 @@
|
||||
boost_module (fusion DEPENDS function_types)
|
Reference in New Issue
Block a user