Merge pull request #119 from boostorg/develop

Post 1.60.0 Beta bugfixes.
This commit is contained in:
Joel de Guzman
2015-12-11 15:06:59 +08:00
14 changed files with 203 additions and 67 deletions

View File

@ -9,6 +9,8 @@
==============================================================================*/
#include <boost/preprocessor/cat.hpp>
#define FUSION_HASH #
#ifdef BOOST_FUSION_REVERSE_FOLD
# ifdef BOOST_FUSION_ITER_FOLD
# define BOOST_FUSION_FOLD_NAME reverse_iter_fold
@ -42,27 +44,92 @@
# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT)
#endif
#if (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
FUSION_HASH else
FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
FUSION_HASH endif
#else
# if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
# else
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
# endif
#endif
namespace boost { namespace fusion
{
namespace detail
{
template<int SeqSize, typename It, typename State, typename F, typename = void>
template<int SeqSize, typename It, typename State, typename F, typename = void
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
// Dirty hack: those compilers cannot choose exactly one partial specialization.
, bool = SeqSize == 0
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
>
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)
{};
template<typename It, typename State, typename F>
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<0,It,State,F
, typename boost::enable_if_has_type<typename State::type>::type>
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
, true
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
>
{
typedef typename State::type type;
};
template<int SeqSize, typename It, typename State, typename F>
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<SeqSize,It,State,F
// MSVC9 issues a compile error as a partial specialization is ambiguous.
, typename boost::enable_if_has_type<
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, >= 1500)
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1500) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
// Following SFINAE enables to avoid MSVC 9's partial specialization
// ambiguous bug but MSVC 8 don't compile, and moreover MSVC 8 style
// workaround won't work with MSVC 9.
typename boost::disable_if_c<SeqSize == 0, State>::type::type
>::type>
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
#endif
#else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
>::type
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
, false
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
>
: BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<
SeqSize-1
, typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<It>::type
@ -217,9 +284,11 @@ namespace boost { namespace fusion
}}
#undef BOOST_FUSION_FOLD_NAME
#undef BOOST_FUSION_FOLD_IMPL_ENABLER
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION
#undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM
#undef FUSION_HASH

View File

@ -8,25 +8,49 @@
This is an auto-generated file. Do not edit!
==============================================================================*/
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
# else
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
# endif
namespace boost { namespace fusion
{
namespace detail
{
template<int SeqSize, typename It, typename State, typename F, typename = void>
template<int SeqSize, typename It, typename State, typename F, typename = void
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, bool = SeqSize == 0
# endif
>
struct result_of_it_fold
{};
template<typename It, typename State, typename F>
struct result_of_it_fold<0,It,State,F
, typename boost::enable_if_has_type<typename State::type>::type>
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, true
# endif
>
{
typedef typename State::type type;
};
template<int SeqSize, typename It, typename State, typename F>
struct result_of_it_fold<SeqSize,It,State,F
, typename boost::enable_if_has_type<
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
typename boost::disable_if_c<SeqSize == 0, State>::type::type
>::type>
# else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
# endif
>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, false
# endif
>
: result_of_it_fold<
SeqSize-1
, typename result_of::next<It>::type

View File

@ -7,25 +7,49 @@
This is an auto-generated file. Do not edit!
==============================================================================*/
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
# else
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
# endif
namespace boost { namespace fusion
{
namespace detail
{
template<int SeqSize, typename It, typename State, typename F, typename = void>
template<int SeqSize, typename It, typename State, typename F, typename = void
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, bool = SeqSize == 0
# endif
>
struct result_of_it_iter_fold
{};
template<typename It, typename State, typename F>
struct result_of_it_iter_fold<0,It,State,F
, typename boost::enable_if_has_type<typename State::type>::type>
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, true
# endif
>
{
typedef typename State::type type;
};
template<int SeqSize, typename It, typename State, typename F>
struct result_of_it_iter_fold<SeqSize,It,State,F
, typename boost::enable_if_has_type<
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
typename boost::disable_if_c<SeqSize == 0, State>::type::type
>::type>
# else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
# endif
>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, false
# endif
>
: result_of_it_iter_fold<
SeqSize-1
, typename result_of::next<It>::type

View File

@ -7,25 +7,49 @@
This is an auto-generated file. Do not edit!
==============================================================================*/
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
# else
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
# endif
namespace boost { namespace fusion
{
namespace detail
{
template<int SeqSize, typename It, typename State, typename F, typename = void>
template<int SeqSize, typename It, typename State, typename F, typename = void
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, bool = SeqSize == 0
# endif
>
struct result_of_it_reverse_fold
{};
template<typename It, typename State, typename F>
struct result_of_it_reverse_fold<0,It,State,F
, typename boost::enable_if_has_type<typename State::type>::type>
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, true
# endif
>
{
typedef typename State::type type;
};
template<int SeqSize, typename It, typename State, typename F>
struct result_of_it_reverse_fold<SeqSize,It,State,F
, typename boost::enable_if_has_type<
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
typename boost::disable_if_c<SeqSize == 0, State>::type::type
>::type>
# else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
# endif
>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, false
# endif
>
: result_of_it_reverse_fold<
SeqSize-1
, typename result_of::prior<It>::type

View File

@ -7,25 +7,49 @@
This is an auto-generated file. Do not edit!
==============================================================================*/
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
# else
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
# endif
namespace boost { namespace fusion
{
namespace detail
{
template<int SeqSize, typename It, typename State, typename F, typename = void>
template<int SeqSize, typename It, typename State, typename F, typename = void
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, bool = SeqSize == 0
# endif
>
struct result_of_it_reverse_iter_fold
{};
template<typename It, typename State, typename F>
struct result_of_it_reverse_iter_fold<0,It,State,F
, typename boost::enable_if_has_type<typename State::type>::type>
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, true
# endif
>
{
typedef typename State::type type;
};
template<int SeqSize, typename It, typename State, typename F>
struct result_of_it_reverse_iter_fold<SeqSize,It,State,F
, typename boost::enable_if_has_type<
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
typename boost::disable_if_c<SeqSize == 0, State>::type::type
>::type>
# else
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
# endif
>::type
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
, false
# endif
>
: result_of_it_reverse_iter_fold<
SeqSize-1
, typename result_of::prior<It>::type

View File

@ -47,7 +47,7 @@ namespace boost { namespace fusion
struct apply
{
typedef typename boost::remove_cv<Sequence>::type seq;
typedef decltype(seq::template value_at_impl<N::value>(boost::declval<seq*>())) type;
typedef typename mpl::identity<decltype(seq::template value_at_impl<N::value>(boost::declval<seq*>()))>::type::type type;
};
};
}

View File

@ -36,7 +36,6 @@
#include <boost/core/enable_if.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/remove_cv.hpp>
@ -272,8 +271,8 @@ namespace boost { namespace fusion
}
template <std::size_t N, typename U>
static BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
U value_at_impl(store<N, U>*) { return boost::declval<U>(); }
static BOOST_FUSION_GPU_ENABLED
mpl::identity<U> value_at_impl(store<N, U>*);
};
template <typename V, typename... T>

View File

@ -39,9 +39,9 @@
#include <boost/function_types/parameter_types.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/detail/enabler.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/front.hpp>
@ -148,7 +148,7 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke<Function, Sequence,
typename detail::enabler<
typename enable_if_has_type<
typename detail::invoke_impl<
typename boost::remove_reference<Function>::type, Sequence
>::result_type
@ -195,7 +195,7 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke_impl<Function,Sequence,N,false,true,
typename enabler<
typename enable_if_has_type<
typename boost::result_of<Function(BOOST_PP_ENUM(N,M,~)) >::type
>::type>
{
@ -289,7 +289,7 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke_impl<Function,Sequence,N,false,false,
typename enabler<
typename enable_if_has_type<
#define L(z,j,data) typename invoke_param_types<Sequence,N>::BOOST_PP_CAT(T, j)
typename boost::result_of<Function(BOOST_PP_ENUM(N,L,~))>::type
>::type>

View File

@ -18,14 +18,12 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/detail/enabler.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
@ -62,7 +60,7 @@ namespace boost { namespace fusion
template <class Function, class Sequence>
struct invoke_function_object<Function, Sequence,
typename detail::enabler<
typename enable_if_has_type<
typename detail::invoke_function_object_impl<
typename boost::remove_reference<Function>::type, Sequence
>::result_type
@ -110,7 +108,7 @@ namespace boost { namespace fusion
template <class Function, class Sequence>
struct invoke_function_object_impl<Function,Sequence,N,true,
typename enabler<
typename enable_if_has_type<
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
>::type>
{
@ -151,7 +149,7 @@ namespace boost { namespace fusion
template <class Function, class Sequence>
struct invoke_function_object_impl<Function,Sequence,N,false,
typename enabler<
typename enable_if_has_type<
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
>::type>
#undef M

View File

@ -20,6 +20,7 @@
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/mpl/front.hpp>
@ -28,7 +29,6 @@
#include <boost/function_types/parameter_types.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/detail/enabler.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
@ -66,7 +66,7 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke_procedure<Function, Sequence,
typename detail::enabler<
typename enable_if_has_type<
typename detail::invoke_procedure_impl<
typename boost::remove_reference<Function>::type,Sequence
>::result_type

View File

@ -110,8 +110,7 @@ namespace boost { namespace fusion
{
// read a delimiter
string_type const* p = stream_data_t::get(stream);
using namespace std;
ws(stream);
std::ws(stream);
if (p)
{

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2015 Kohei Takahashi
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).
==============================================================================*/
#ifndef FUSION_DETAIL_ENABLER_02082015_163810
#define FUSION_DETAIL_ENABLER_02082015_163810
namespace boost { namespace fusion { namespace detail
{
template <typename, typename T = void>
struct enabler { typedef T type; };
}}}
#endif

View File

@ -17,9 +17,6 @@
#include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_convertible.hpp>
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
#include <boost/type_traits/declval.hpp>
#endif
namespace boost { namespace fusion
{
@ -62,12 +59,9 @@ namespace boost { namespace fusion
// never called, but needed for decltype-based result_of (C++0x)
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename StrictestSoFar, typename Next>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
BOOST_FUSION_GPU_ENABLED
typename result<strictest_traversal_impl(StrictestSoFar, Next)>::type
operator()(StrictestSoFar&&, Next&&) const
{
return boost::declval<typename result<strictest_traversal_impl(StrictestSoFar, Next)>::type>();
}
operator()(StrictestSoFar&&, Next&&) const;
#endif
};

View File

@ -13,6 +13,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/core/enable_if.hpp>
#if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
@ -20,8 +21,6 @@
namespace sfinae_friendly
{
template <typename, typename T = void> struct void_ { typedef T type; };
template <typename> struct arg_;
template <typename R, typename T> struct arg_<R(T)> { typedef T type; };
@ -30,7 +29,7 @@ namespace sfinae_friendly
: boost::mpl::true_ { };
template <typename Traits>
struct check<Traits, typename void_<typename Traits::type>::type>
struct check<Traits, typename boost::enable_if_has_type<typename Traits::type>::type>
: boost::mpl::false_ { };
struct unspecified {};