Clean up MSVC build. Fixes #1619. Fixes #3074.

[SVN r62854]
This commit is contained in:
Steven Watanabe
2010-06-12 15:58:31 +00:00
parent d5f6d5eafe
commit 7c986ebd61
62 changed files with 313 additions and 86 deletions

View File

@ -127,6 +127,10 @@ namespace boost { namespace fusion
return type();
}
};
private:
// silence MSVC warning C4512: assignment operator could not be generated
boost_tuple_iterator& operator= (boost_tuple_iterator const&);
};
template <typename Null>

View File

@ -63,6 +63,9 @@
} \
\
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
\
private: \
class_member_proxy& operator= (class_member_proxy const&); \
}; \
\
template< \

View File

@ -80,7 +80,7 @@ namespace boost { namespace fusion
type;
static type
call(Iterator const& i)
call(Iterator const& /*i*/)
{
return type();
}

View File

@ -23,6 +23,9 @@
{} \
\
WRAPPED_TYPE& obj; \
\
private: \
NAME& operator= (NAME const&); \
}; \
\
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)

View File

@ -106,7 +106,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<0>
{
template <typename It, typename F>
static bool call(It const& it, F f)
static bool call(It const& /*it*/, F /*f*/)
{
return true;
}

View File

@ -7,10 +7,16 @@
#if !defined(FUSION_COUNT_09162005_0158)
#define FUSION_COUNT_09162005_0158
#include <boost/config.hpp>
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/fusion/support/detail/access.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion { namespace detail
{
template <bool is_convertible>
@ -64,5 +70,9 @@ namespace boost { namespace fusion { namespace detail
};
}}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -22,7 +22,7 @@ namespace boost { namespace fusion
template <typename Sequence>
inline typename result_of::clear<Sequence const>::type
clear(Sequence const& seq)
clear(Sequence const& /*seq*/)
{
return vector0<>();
}

View File

@ -68,7 +68,7 @@ namespace boost { namespace fusion {
{}
template<typename Sequence>
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0)
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
: base(base::from_iterator(fusion::begin(seq)))
{}

View File

@ -100,6 +100,10 @@ namespace boost { namespace fusion {
{};
Seq& seq_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
deque_iterator& operator= (deque_iterator const&);
};
}}

View File

@ -46,11 +46,11 @@ namespace boost { namespace fusion
nil() {}
template <typename Iterator>
nil(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/)
{}
template <typename Iterator>
void assign_from_iter(Iterator const& iter)
void assign_from_iter(Iterator const& /*iter*/)
{
}
};
@ -92,7 +92,7 @@ namespace boost { namespace fusion
is_convertible<Sequence, cons> // use copy ctor instead
, is_convertible<Sequence, Car> // use copy to car instead
>
>::type* dummy = 0
>::type* /*dummy*/ = 0
)
: car(*fusion::begin(seq))
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}

View File

@ -111,7 +111,7 @@ namespace boost { namespace fusion
typename add_reference<
typename mpl::at<types, I>::type
>::type
at_impl(I index)
at_impl(I /*index*/)
{
return vec.at_impl(mpl::int_<I::value>());
}
@ -122,7 +122,7 @@ namespace boost { namespace fusion
typename mpl::at<types, I>::type
>::type
>::type
at_impl(I index) const
at_impl(I /*index*/) const
{
return vec.at_impl(mpl::int_<I::value>());
}

View File

@ -52,7 +52,7 @@ namespace boost { namespace fusion
vector0() {}
template<typename Sequence>
vector0(Sequence const& seq)
vector0(Sequence const& /*seq*/)
{}
};

View File

@ -7,11 +7,6 @@
#if !defined(FUSION_VECTOR_ITERATOR_05042005_0635)
#define FUSION_VECTOR_ITERATOR_05042005_0635
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/container/vector/detail/deref_impl.hpp>
#include <boost/fusion/container/vector/detail/value_of_impl.hpp>
@ -44,12 +39,12 @@ namespace boost { namespace fusion
vector_iterator(Vector& vec)
: vec(vec) {}
Vector& vec;
private:
// silence MSVC warning C4512: assignment operator could not be generated
vector_iterator& operator= (vector_iterator const&);
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -10,10 +10,16 @@
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/config.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
template <typename Function> class fused;
@ -81,5 +87,9 @@ namespace boost { namespace fusion
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -10,10 +10,16 @@
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/config.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
template <class Function> class fused_function_object;
@ -86,5 +92,9 @@ namespace boost { namespace fusion
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -10,10 +10,16 @@
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/config.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
template <typename Function> class fused_procedure;
@ -66,5 +72,9 @@ namespace boost { namespace fusion
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -17,11 +17,18 @@
#include <boost/utility/result_of.hpp>
#include <boost/config.hpp>
#include <boost/fusion/container/vector/vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
template <class Function, bool AllowNullary = true>
@ -87,6 +94,10 @@ namespace boost { namespace fusion
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
namespace boost
{
template<class F>

View File

@ -28,6 +28,11 @@
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
@ -69,6 +74,10 @@ namespace boost { namespace fusion
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
namespace boost
{
template<class F, class Seq>

View File

@ -199,6 +199,8 @@ namespace boost { namespace fusion
Function(BOOST_PP_ENUM(N,M,~)) >::type result_type;
#undef M
#if N > 0
template <typename F>
static inline result_type
call(F & f, Sequence & s)
@ -206,6 +208,17 @@ namespace boost { namespace fusion
#define M(z,j,data) fusion::at_c<j>(s)
return f( BOOST_PP_ENUM(N,M,~) );
}
#else
template <typename F>
static inline result_type
call(F & f, Sequence & /*s*/)
{
return f();
}
#endif
};
@ -245,16 +258,28 @@ namespace boost { namespace fusion
Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T))
>::type result_type;
#if N > 0
template <typename F>
static inline result_type
call(F & f, Sequence & s)
{
#if N > 0
typename seq::I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#endif
return f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
#else
template <typename F>
static inline result_type
call(F & f, Sequence & /*s*/)
{
return f();
}
#endif
};
#if N > 0

View File

@ -118,6 +118,8 @@ namespace boost { namespace fusion
Function (BOOST_PP_ENUM(N,M,~)) >::type result_type;
#undef M
#if N > 0
template <class F>
static inline result_type
call(F & f, Sequence & s)
@ -126,6 +128,18 @@ namespace boost { namespace fusion
return f( BOOST_PP_ENUM(N,M,~) );
#undef M
}
#else
template <class F>
static inline result_type
call(F & f, Sequence & /*s*/)
{
return f();
}
#endif
};
template <class Function, class Sequence>
@ -138,20 +152,32 @@ namespace boost { namespace fusion
Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T))
>::type result_type;
#if N > 0
template <class F>
static inline result_type
call(F & f, Sequence & s)
{
#if N > 0
typename seq::I0 i0 = fusion::begin(s);
#define M(z,j,data) \
typename seq::I##j i##j = \
fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#undef M
#endif
return f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
#else
template <class F>
static inline result_type
call(F & f, Sequence & /*s*/)
{
return f();
}
#endif
};
template <class Sequence>

View File

@ -106,10 +106,23 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,false,true>
{
#if N > 0
static inline void call(Function & f, Sequence & s)
{
f(BOOST_PP_ENUM(N,M,~));
}
#else
static inline void call(Function & f, Sequence & /*s*/)
{
f();
}
#endif
};
#if N > 0
@ -135,15 +148,25 @@ namespace boost { namespace fusion
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,false,false>
{
#if N > 0
static inline void call(Function & f, Sequence & s)
{
#if N > 0
typedef typename result_of::begin<Sequence>::type I0;
I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#endif
f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
#else
static inline void call(Function & f, Sequence & /*s*/)
{
f();
}
#endif
};
#if N > 0

View File

@ -37,7 +37,7 @@ namespace boost { namespace fusion
}
static mpl_iterator<T>
call(T const& x, mpl::false_)
call(T const& /*x*/, mpl::false_)
{
return mpl_iterator<T>();
}

View File

@ -13,6 +13,12 @@
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4100) // unreferenced formal parameter
#endif
namespace boost { namespace fusion
{
@ -43,4 +49,8 @@ namespace boost { namespace fusion
using operators::operator==;
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -10,6 +10,12 @@
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
@ -99,4 +105,8 @@ namespace boost { namespace fusion
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -21,7 +21,6 @@
#include <boost/mpl/inherit.hpp>
#include <boost/mpl/identity.hpp>
namespace boost { namespace fusion
{
struct filter_view_tag;

View File

@ -58,6 +58,10 @@ namespace boost { namespace fusion
: first(filter::call(first_converter::call(first))) {}
first_type first;
private:
// silence MSVC warning C4512: assignment operator could not be generated
filter_iterator& operator= (filter_iterator const&);
};
}}

View File

@ -17,6 +17,12 @@
#include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
#include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
@ -44,6 +50,10 @@ namespace boost { namespace fusion
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -62,6 +62,8 @@ namespace boost { namespace fusion
concat_last_type concat_last() const { return fusion::end(seq2); }
private:
// silence MSVC warning C4512: assignment operator could not be generated
joint_view& operator= (joint_view const&);
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;

View File

@ -47,6 +47,10 @@ namespace boost { namespace fusion
first_type first;
concat_type concat;
private:
// silence MSVC warning C4512: assignment operator could not be generated
joint_view_iterator& operator= (joint_view_iterator const&);
};
}}

View File

@ -31,7 +31,7 @@ namespace boost { namespace fusion
>::type type;
static type
call(First const& first, Last const& last)
call(First const& /*first*/, Last const& /*last*/)
{
return type();
}

View File

@ -41,6 +41,10 @@ namespace boost { namespace fusion
: seq(seq) {}
stored_seq_type seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
repetitive_view& operator= (repetitive_view const&);
};
}}

View File

@ -44,6 +44,10 @@ namespace boost { namespace fusion
Sequence& seq;
pos_type pos;
private:
// silence MSVC warning C4512: assignment operator could not be generated
repetitive_view_iterator& operator= (repetitive_view_iterator const&);
};
}}

View File

@ -56,6 +56,10 @@ namespace boost { namespace fusion
first_type first() const { return fusion::begin(seq); }
last_type last() const { return fusion::end(seq); }
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
reverse_view& operator= (reverse_view const&);
};
}}

View File

@ -45,6 +45,10 @@ namespace boost { namespace fusion
: first(converter::call(first)) {}
first_type first;
private:
// silence MSVC warning C4512: assignment operator could not be generated
reverse_view_iterator& operator= (reverse_view_iterator const&);
};
}}

View File

@ -15,6 +15,12 @@
#include <boost/fusion/view/single_view/detail/end_impl.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/int.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
@ -49,6 +55,10 @@ namespace boost { namespace fusion
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -12,6 +12,12 @@
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
@ -42,6 +48,10 @@ namespace boost { namespace fusion
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -69,6 +69,10 @@ namespace boost { namespace fusion
transform_type f;
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
private:
// silence MSVC warning C4512: assignment operator could not be generated
transform_view& operator= (transform_view const&);
};
// Unary Version

View File

@ -70,7 +70,7 @@ namespace boost { namespace fusion {
: detail::zip_view_iterator_distance<It1, It2>::type
{
static typename detail::zip_view_iterator_distance<It1, It2>::type
call(It1 const& it1, It2 const& it2)
call(It1 const& /*it1*/, It2 const& /*it2*/)
{
return typename detail::zip_view_iterator_distance<It1, It2>::type();
}

View File

@ -43,7 +43,7 @@ struct add_ints_only
template <typename State, typename T>
State
operator()(State const& state, T const& x) const
operator()(State const& state, T const& /*x*/) const
{
return state;
}

View File

@ -98,14 +98,14 @@ main()
{
// conversion from ns::point to vector
ns::point p(5, 3);
boost::fusion::vector<int, short> v(p);
boost::fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p(5, 3);
boost::fusion::list<int, short> l(p);
boost::fusion::list<int, long> l(p);
l = p;
}

View File

@ -102,7 +102,7 @@ main()
// conversion from adapted::point to vector
ns::point basep(5, 3);
adapted::point p(basep);
boost::fusion::vector<int, short> v(p);
boost::fusion::vector<int, long> v(p);
v = p;
}
@ -110,7 +110,7 @@ main()
// conversion from adated::point to list
ns::point basep(5, 3);
adapted::point p(basep);
boost::fusion::list<int, short> l(p);
boost::fusion::list<int, long> l(p);
l = p;
}

View File

@ -104,14 +104,14 @@ main()
{
// conversion from ns::point to vector
ns::point p = {5, 3};
fusion::vector<int, short> v(p);
fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p = {5, 3};
fusion::list<int, short> l(p);
fusion::list<int, long> l(p);
l = p;
}

View File

@ -88,7 +88,7 @@ main()
// conversion from adapted::point to vector
ns::point basep = {5, 3};
adapted::point p(basep);
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
@ -96,7 +96,7 @@ main()
// conversion from adapted::point to list
ns::point basep = {5, 3};
adapted::point p(basep);
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -102,14 +102,14 @@ main()
{
// conversion from point to vector
point p(5, 3);
boost::fusion::vector<int, short> v(p);
boost::fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p(5, 3);
boost::fusion::list<int, short> l(p);
boost::fusion::list<int, long> l(p);
l = p;
}

View File

@ -102,14 +102,14 @@ main()
{
// conversion from point to vector
point p = {5, 3};
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p = {5, 3};
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -106,14 +106,14 @@ main()
{
// conversion from ns::point to vector
ns::point p(5, 3);
fusion::vector<int, short> v(p);
fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p(5, 3);
fusion::list<int, short> l(p);
fusion::list<int, long> l(p);
l = p;
}

View File

@ -112,7 +112,7 @@ main()
ns::point basep(5, 3);
adapted::point p(basep);
fusion::vector<int, short> v(p);
fusion::vector<int, long> v(p);
v = p;
}
@ -121,7 +121,7 @@ main()
ns::point basep(5, 3);
adapted::point p(basep);
fusion::list<int, short> l(p);
fusion::list<int, long> l(p);
l = p;
}

View File

@ -97,14 +97,14 @@ main()
{
// conversion from ns::point to vector
ns::point p = {5, 3};
fusion::vector<int, short> v(p);
fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p = {5, 3};
fusion::list<int, short> l(p);
fusion::list<int, long> l(p);
l = p;
}

View File

@ -103,7 +103,7 @@ main()
// conversion from adapted::point to vector
ns::point basep = {5, 3};
adapted::point p(basep);
fusion::vector<int, short> v(p);
fusion::vector<int, long> v(p);
v = p;
}
@ -111,7 +111,7 @@ main()
// conversion from adapted::point to list
ns::point basep = {5, 3};
adapted::point p(basep);
fusion::list<int, short> l(p);
fusion::list<int, long> l(p);
l = p;
}

View File

@ -110,14 +110,14 @@ main()
{
// conversion from point to vector
point p(5, 3);
boost::fusion::vector<int, short> v(p);
boost::fusion::vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p(5, 3);
boost::fusion::list<int, short> l(p);
boost::fusion::list<int, long> l(p);
l = p;
}

View File

@ -97,14 +97,14 @@ main()
{
// conversion from point to vector
point p = {5, 3};
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p = {5, 3};
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -26,6 +26,7 @@ main()
{
using namespace boost::fusion;
using boost::is_same;
namespace fusion = boost::fusion;
std::cout << tuple_open('[');
std::cout << tuple_close(']');
@ -39,18 +40,18 @@ main()
make_cons(1, make_cons(hello));
BOOST_TEST((*begin(ns) == 1));
BOOST_TEST((*next(begin(ns)) == hello));
BOOST_TEST((*fusion::next(begin(ns)) == hello));
*begin(ns) += 1;
*next(begin(ns)) += ' ';
*fusion::next(begin(ns)) += ' ';
BOOST_TEST((*begin(ns) == 2));
BOOST_TEST((*next(begin(ns)) == hello + ' '));
BOOST_TEST((*fusion::next(begin(ns)) == hello + ' '));
for_each(ns, boost::lambda::_1 += ' ');
BOOST_TEST((*begin(ns) == 2 + ' '));
BOOST_TEST((*next(begin(ns)) == hello + ' ' + ' '));
BOOST_TEST((*fusion::next(begin(ns)) == hello + ' ' + ' '));
}
{

View File

@ -75,14 +75,14 @@ main()
{
// conversion from ns::point to vector
ns::point p(5, 3);
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p(5, 3);
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -79,14 +79,14 @@ main()
{
// conversion from point to vector
point p(5, 3);
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p(5, 3);
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -72,14 +72,14 @@ main()
{
// conversion from ns::point to vector
ns::point p(5, 3);
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from ns::point to list
ns::point p(5, 3);
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -75,14 +75,14 @@ main()
{
// conversion from point to vector
point p(5, 3);
vector<int, short> v(p);
vector<int, long> v(p);
v = p;
}
{
// conversion from point to list
point p(5, 3);
list<int, short> l(p);
list<int, long> l(p);
l = p;
}

View File

@ -28,6 +28,7 @@ int
main()
{
using namespace boost::fusion;
namespace fusion = boost::fusion;
std::cout << tuple_open('[');
std::cout << tuple_close(']');
@ -104,9 +105,9 @@ main()
BOOST_MPL_ASSERT((boost::is_same<result_of::value_of_data<result_of::next<result_of::begin<range_type>::type>::type>::type, char>));
std::cout << deref_data(begin(r)) << std::endl;
std::cout << deref_data(next(begin(r))) << std::endl;
std::cout << deref_data(fusion::next(begin(r))) << std::endl;
BOOST_TEST((deref_data(begin(r)) == "foo"));
BOOST_TEST((deref_data(next(begin(r))) == 'x'));
BOOST_TEST((deref_data(fusion::next(begin(r))) == 'x'));
}
return boost::report_errors();

View File

@ -34,6 +34,7 @@ int
main()
{
using namespace boost::fusion;
namespace fusion = boost::fusion;
std::cout << tuple_open('[');
std::cout << tuple_close(']');
@ -175,11 +176,11 @@ main()
, float>));
std::cout << deref_data(begin(j)) << std::endl;
std::cout << deref_data(boost::fusion::next(begin(j))) << std::endl;
std::cout << deref_data(next(boost::fusion::next(begin(j)))) << std::endl;
std::cout << deref_data(fusion::next(begin(j))) << std::endl;
std::cout << deref_data(fusion::next(fusion::next(begin(j)))) << std::endl;
BOOST_TEST((deref_data(begin(j)) == 0));
BOOST_TEST((deref_data(boost::fusion::next(begin(j))) == "foo"));
BOOST_TEST((deref_data(next(boost::fusion::next(begin(j)))) == 1.3f));
BOOST_TEST((deref_data(fusion::next(begin(j))) == "foo"));
BOOST_TEST((deref_data(fusion::next(fusion::next(begin(j)))) == 1.3f));
}
return boost::report_errors();

View File

@ -29,6 +29,7 @@ main()
using namespace boost::fusion;
using namespace boost;
using namespace std;
namespace fusion = boost::fusion;
using boost::fusion::pair;
using boost::fusion::make_pair;
@ -66,15 +67,15 @@ main()
BOOST_STATIC_ASSERT((!result_of::has_key<map_type, std::string>::value));
std::cout << deref_data(begin(m)) << std::endl;
std::cout << deref_data(next(begin(m))) << std::endl;
std::cout << deref_data(fusion::next(begin(m))) << std::endl;
BOOST_TEST(deref_data(begin(m)) == 'X');
BOOST_TEST(deref_data(next(begin(m))) == "Men");
BOOST_TEST(deref_data(fusion::next(begin(m))) == "Men");
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::begin<map_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::next<result_of::begin<map_type>::type>::type>::type, double>::value));
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::begin<map_type>::type>::type, char>::value));
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::next<result_of::begin<map_type>::type>::type>::type, std::string>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::begin<map_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::next<result_of::begin<map_type>::type>::type>::type, double>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::begin<map_type>::type>::type, char>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::next<result_of::begin<map_type>::type>::type>::type, std::string>::value));
}
{

View File

@ -151,7 +151,7 @@ test()
{ // testing front & back
typedef FUSION_SEQUENCE<int, float, std::string> tup;
tup t(1, 2.2, "Kimpo");
tup t(1, 2.2f, "Kimpo");
BOOST_TEST(front(t) == 1);
#if !defined(FUSION_FORWARD_ONLY) // list has no back

View File

@ -29,6 +29,7 @@ main()
using namespace boost::fusion;
using namespace boost;
using namespace std;
namespace fusion = boost::fusion;
using boost::fusion::pair;
using boost::fusion::make_pair;
@ -61,15 +62,15 @@ main()
BOOST_STATIC_ASSERT((!result_of::has_key<set_type, double>::value));
std::cout << deref_data(begin(m)) << std::endl;
std::cout << deref_data(next(begin(m))) << std::endl;
std::cout << deref_data(fusion::next(begin(m))) << std::endl;
BOOST_TEST(deref_data(begin(m)) == 123);
BOOST_TEST(deref_data(next(begin(m))) == "Hola");
BOOST_TEST(deref_data(fusion::next(begin(m))) == "Hola");
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::begin<set_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::begin<set_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::begin<set_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::begin<set_type>::type>::type, int>::value));
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
}
{

View File

@ -48,7 +48,7 @@ namespace Core
} // namespace Core
int main(int argc, char* argv[])
int main()
{
std::tr1::tuple<int, int, int, int> test = Core::Demo();
return 0;