From ed30a7ca6a462e2abe3b7f48f7f6da5a9795f691 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Mon, 27 Jul 2015 13:12:46 +0900 Subject: [PATCH 1/2] Fix issue 11140 --- include/boost/fusion/tuple/detail/tuple.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/tuple/detail/tuple.hpp b/include/boost/fusion/tuple/detail/tuple.hpp index f9270687..9ed91121 100644 --- a/include/boost/fusion/tuple/detail/tuple.hpp +++ b/include/boost/fusion/tuple/detail/tuple.hpp @@ -52,7 +52,7 @@ namespace boost { namespace fusion : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast(rhs)) {} template BOOST_FUSION_GPU_ENABLED @@ -72,7 +72,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast(rhs)); return *this; } From 4fa0a5f550ac6eed4012aa8ec7f4add2a3081189 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Mon, 27 Jul 2015 13:31:19 +0900 Subject: [PATCH 2/2] Add tests for nested fusion::tuple. --- test/Jamfile | 1 + test/sequence/tuple_nest.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/sequence/tuple_nest.cpp diff --git a/test/Jamfile b/test/Jamfile index 87b4bf51..f9c71c71 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -121,6 +121,7 @@ project [ run sequence/tuple_make.cpp : : : : ] [ run sequence/tuple_misc.cpp : : : : ] [ run sequence/tuple_mutate.cpp : : : : ] + [ run sequence/tuple_nest.cpp : : : : ] [ run sequence/tuple_hash.cpp : : : : ] [ run sequence/tuple_tie.cpp : : : : ] [ run sequence/transform_view.cpp : : : : ] diff --git a/test/sequence/tuple_nest.cpp b/test/sequence/tuple_nest.cpp new file mode 100644 index 00000000..1d263da4 --- /dev/null +++ b/test/sequence/tuple_nest.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (C) 2015 Kohei Takahshi + + 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) +==============================================================================*/ +#include +#include + +#define FUSION_SEQUENCE tuple +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} +