forked from boostorg/fusion
https://svn.boost.org/svn/boost/trunk ........ r44678 | chris_kohlhoff | 2008-04-20 22:43:42 -0700 (Sun, 20 Apr 2008) | 3 lines Add porthopper example to demonstrate applications that mix synchronous and asynchronous operations. ........ r44679 | chris_kohlhoff | 2008-04-20 22:52:20 -0700 (Sun, 20 Apr 2008) | 3 lines Remove a local variable that was hiding the ec parameter and preventing error codes from being correctly propagated. Fixes #1820. ........ r44681 | chris_kohlhoff | 2008-04-20 23:14:29 -0700 (Sun, 20 Apr 2008) | 2 lines Ensure all non-friend related functions are included in the documentation. ........ r44682 | chris_kohlhoff | 2008-04-20 23:15:17 -0700 (Sun, 20 Apr 2008) | 3 lines Add UNIX domain sockets, POSIX stream-oriented descriptors and Windows stream-oriented handles to the reference documentation. ........ r44683 | chris_kohlhoff | 2008-04-20 23:15:50 -0700 (Sun, 20 Apr 2008) | 2 lines Regenerate documentation. ........ r44684 | chris_kohlhoff | 2008-04-20 23:20:32 -0700 (Sun, 20 Apr 2008) | 3 lines Add documentation on the limits of the number of buffers that may be transferred in individual operations. ........ r44685 | chris_kohlhoff | 2008-04-21 00:59:21 -0700 (Mon, 21 Apr 2008) | 3 lines Add requirements for handle and descriptor services. Add new classes to the quickref index page. ........ r44686 | jhunold | 2008-04-21 01:07:55 -0700 (Mon, 21 Apr 2008) | 2 lines Remove trailing comma at end of enumerator list (gcc 4.x -pedantic error) ........ r44687 | johnmaddock | 2008-04-21 01:46:18 -0700 (Mon, 21 Apr 2008) | 1 line Oops fix typo. ........ r44688 | johnmaddock | 2008-04-21 01:47:04 -0700 (Mon, 21 Apr 2008) | 1 line Fix msvc warnings using new warning suppression header. ........ r44689 | johnmaddock | 2008-04-21 02:19:30 -0700 (Mon, 21 Apr 2008) | 1 line Added new macro BOOST_NO_TEMPLATED_IOSTREAMS in response to issue #1765. ........ r44691 | speedsnail | 2008-04-21 04:46:03 -0700 (Mon, 21 Apr 2008) | 1 line removed act-as-jamfile, which gives errors when boost.use-project is not invoked from Jamroot file. ........ r44692 | johnmaddock | 2008-04-21 05:06:02 -0700 (Mon, 21 Apr 2008) | 2 lines Changed macro BOOST_PARTIAL_SPECIALIZATION_EXPLICIT_ARGS to BOOST_NO_PARTIAL_SPECIALIZATION_DEFAULT_ARGS. Changed <utility> to <boost/config/no_tr1/utility.hpp> in order to prevent cyclic dependencies between Fusion Tuples and TR1. ........ r44694 | johnmaddock | 2008-04-21 06:00:16 -0700 (Mon, 21 Apr 2008) | 2 lines Merged changes from the Sandbox, and rebuilt the docs. Also added some missing files. ........ r44697 | danieljames | 2008-04-21 08:55:40 -0700 (Mon, 21 Apr 2008) | 1 line Factor out the code for choosing the bucket count, and which bucket that hash values map to make it easier to experiment with alternative policies. ........ r44698 | anthonyw | 2008-04-21 09:20:31 -0700 (Mon, 21 Apr 2008) | 1 line added private copy assignment operator and copy constructor to remove warnings ........ r44699 | anthonyw | 2008-04-21 09:22:16 -0700 (Mon, 21 Apr 2008) | 1 line Revamped condition variable to try and fix swallowed-notify problems (trac issue #1834) ........ r44704 | pdimov | 2008-04-21 14:29:28 -0700 (Mon, 21 Apr 2008) | 1 line Add ref_fn_test.cpp per #1846. ........ r44705 | pdimov | 2008-04-21 14:42:29 -0700 (Mon, 21 Apr 2008) | 1 line Fix #1846. ........ r44706 | emildotchevski | 2008-04-21 15:42:54 -0700 (Mon, 21 Apr 2008) | 1 line Fixed MSVC-specific compile errors when /Za command-line option is used, due to lack of throw() in std::~exception(). ........ r44707 | pdimov | 2008-04-21 16:01:51 -0700 (Mon, 21 Apr 2008) | 1 line Honor BOOST_NO_TEMPLATED_IOSTREAMS. ........ r44711 | daniel_frey | 2008-04-21 23:31:32 -0700 (Mon, 21 Apr 2008) | 1 line Avoid unneccessary increment/decrement of reference count ........ r44715 | johnmaddock | 2008-04-22 01:34:43 -0700 (Tue, 22 Apr 2008) | 1 line Added new files. ........ r44717 | dgregor | 2008-04-22 05:24:25 -0700 (Tue, 22 Apr 2008) | 1 line Resource-constrained shortest paths, from Michael Drexl ........ r44718 | hkaiser | 2008-04-22 07:13:58 -0700 (Tue, 22 Apr 2008) | 2 lines Spirit: Started to add '#include <boost/config/warning_disable.hpp>' to tests and examples. ........ r44719 | hkaiser | 2008-04-22 08:10:52 -0700 (Tue, 22 Apr 2008) | 1 line Spirit.Support: Minor change ........ r44722 | hkaiser | 2008-04-22 10:23:21 -0700 (Tue, 22 Apr 2008) | 1 line Wave: fixed #1843 ........ [SVN r44725]
87 lines
3.0 KiB
C++
87 lines
3.0 KiB
C++
/*=============================================================================
|
|
Copyright (c) 2001-2006 Joel de Guzman
|
|
Copyright (c) 2006 Dan Marsden
|
|
|
|
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 BOOST_PP_IS_ITERATING
|
|
#if !defined(FUSION_ZIP_HPP_20060125_2058)
|
|
#define FUSION_ZIP_HPP_20060125_2058
|
|
|
|
#include <boost/fusion/view/zip_view.hpp>
|
|
#include <boost/fusion/adapted/mpl.hpp>
|
|
#include <boost/fusion/container/vector.hpp>
|
|
#include <boost/fusion/container/vector/convert.hpp>
|
|
#include <boost/type_traits/add_reference.hpp>
|
|
#include <boost/preprocessor/repetition/enum.hpp>
|
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
|
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
|
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
|
#include <boost/preprocessor/arithmetic/inc.hpp>
|
|
#include <boost/preprocessor/iteration/iterate.hpp>
|
|
#include <boost/mpl/vector.hpp>
|
|
#include <boost/mpl/transform.hpp>
|
|
#include <boost/mpl/placeholders.hpp>
|
|
|
|
#if !defined(FUSION_MAX_ZIP_SEQUENCES)
|
|
#define FUSION_MAX_ZIP_SEQUENCES 10
|
|
#endif
|
|
|
|
namespace boost { namespace fusion {
|
|
|
|
struct void_;
|
|
|
|
namespace result_of
|
|
{
|
|
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_INC(FUSION_MAX_ZIP_SEQUENCES), typename T, fusion::void_)>
|
|
struct zip;
|
|
}
|
|
|
|
#define BOOST_PP_FILENAME_1 \
|
|
<boost/fusion/algorithm/transformation/zip.hpp>
|
|
#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_ZIP_SEQUENCES)
|
|
#include BOOST_PP_ITERATE()
|
|
|
|
}}
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define ZIP_ITERATION BOOST_PP_ITERATION()
|
|
|
|
namespace result_of
|
|
{
|
|
template< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T) >
|
|
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
|
|
#define TEXT(z, n, text) , text
|
|
struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(ZIP_ITERATION), FUSION_MAX_ZIP_SEQUENCES, TEXT, void_) >
|
|
#undef TEXT
|
|
#else
|
|
struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) >
|
|
#endif
|
|
{
|
|
typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences;
|
|
typedef typename mpl::transform<sequences, add_reference<mpl::_> >::type ref_params;
|
|
typedef zip_view<typename result_of::as_vector<ref_params>::type> type;
|
|
};
|
|
}
|
|
|
|
#define FUSION_REF_PARAM(z, n, data) const T ## n&
|
|
|
|
template<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T)>
|
|
inline typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type
|
|
zip(BOOST_PP_ENUM_BINARY_PARAMS(ZIP_ITERATION, T, const& t))
|
|
{
|
|
fusion::vector<BOOST_PP_ENUM(ZIP_ITERATION, FUSION_REF_PARAM, _)> seqs(
|
|
BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, t));
|
|
return typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type(
|
|
seqs);
|
|
}
|
|
|
|
#undef FUSION_REF_PARAM
|
|
#undef ZIP_ITERATION
|
|
|
|
#endif
|