diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp index 7c9417e5..db8a967a 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -94,13 +94,13 @@ namespace boost { namespace fusion { {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque const& seq) : base(seq) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -129,7 +129,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if >::type* /*dummy*/ = 0 ) @@ -140,7 +140,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) : base(std::forward(rhs)) {} template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque&& seq , typename disable_if< is_convertible, T0> diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 61d8dbcf..d649068a 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -73,7 +73,7 @@ namespace boost { namespace fusion : car(rhs.car), cdr(rhs.cdr) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED cons( Sequence const& seq , typename boost::enable_if< diff --git a/include/boost/fusion/container/list/list.hpp b/include/boost/fusion/container/list/list.hpp index 5b584131..6a06ef4c 100644 --- a/include/boost/fusion/container/list/list.hpp +++ b/include/boost/fusion/container/list/list.hpp @@ -60,7 +60,7 @@ namespace boost { namespace fusion : inherited_type(rhs) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if >::type* = 0) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/map/detail/cpp03/map.hpp b/include/boost/fusion/container/map/detail/cpp03/map.hpp index e2f471b5..3ff1d05d 100644 --- a/include/boost/fusion/container/map/detail/cpp03/map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/map.hpp @@ -85,7 +85,7 @@ namespace boost { namespace fusion : data(rhs.data) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index f93a693f..e90d28a9 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -66,21 +66,21 @@ namespace boost { namespace fusion {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence&& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) @@ -93,7 +93,7 @@ namespace boost { namespace fusion {} template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(First&& first, T_&&... rest) : base_type(BOOST_FUSION_FWD_ELEM(First, first), BOOST_FUSION_FWD_ELEM(T_, rest)...) {} diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index c1cea915..234fa986 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -116,16 +116,6 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template - // XXX: -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -FUSION_HASH if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -FUSION_HASH endif -#else -#if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -#endif -#endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if >::type* = 0) diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index fd5d57e6..a4cd1ff0 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -49,7 +49,7 @@ namespace boost { namespace fusion #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED pair(Second2&& val , typename boost::disable_if >::type* /* dummy */ = 0 , typename boost::enable_if >::type* /*dummy*/ = 0 diff --git a/test/Jamfile b/test/Jamfile index 752a798a..a21303eb 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -78,6 +78,7 @@ project [ run sequence/list_make.cpp : : : : ] [ run sequence/list_misc.cpp : : : : ] [ run sequence/list_mutate.cpp : : : : ] + [ run sequence/list_nest.cpp : : : : ] [ run sequence/list_tie.cpp : : : : ] [ run sequence/list_value_at.cpp : : : : ] [ run sequence/deque_comparison.cpp : : : : ] @@ -89,6 +90,7 @@ project [ run sequence/deque_misc.cpp : : : : ] [ run sequence/deque_move.cpp : : : : ] [ run sequence/deque_mutate.cpp : : : : ] + [ run sequence/deque_nest.cpp : : : : ] [ run sequence/deque_tie.cpp : : : : ] [ run sequence/deque_value_at.cpp : : : : ] [ run sequence/front_extended_deque.cpp : : : : ] @@ -131,6 +133,7 @@ project [ run sequence/vector_move.cpp : : : : ] [ run sequence/vector_mutate.cpp : : : : ] [ run sequence/vector_n.cpp : : : : ] + [ run sequence/vector_nest.cpp : : : : ] [ run sequence/vector_hash.cpp : : : : ] [ run sequence/vector_tie.cpp : : : : ] [ run sequence/vector_value_at.cpp : : : : ] @@ -184,6 +187,7 @@ project [ compile support/pair_map.cpp : : : : ] [ compile support/pair_set.cpp : : : : ] [ compile support/pair_vector.cpp : : : : ] + [ compile support/pair_nest.cpp : : : : ] # [ compile-fail xxx.cpp : : : : ] diff --git a/test/sequence/deque_nest.cpp b/test/sequence/deque_nest.cpp new file mode 100644 index 00000000..6f70ee9a --- /dev/null +++ b/test/sequence/deque_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 deque +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/list_nest.cpp b/test/sequence/list_nest.cpp new file mode 100644 index 00000000..ff97b807 --- /dev/null +++ b/test/sequence/list_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 list +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/nest.hpp b/test/sequence/nest.hpp new file mode 100644 index 00000000..e8087320 --- /dev/null +++ b/test/sequence/nest.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + 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 + +template +void test_copy() +{ + C src; + C dst = src; + (void)dst; +} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +void test_move() +{ + C src; + C dst = std::move(src); + (void)dst; +} +#endif + +template +void test_all() +{ + test_copy(); +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + test_move(); +#endif +} + +void +test() +{ + using namespace boost::fusion; + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); +} + diff --git a/test/sequence/vector_nest.cpp b/test/sequence/vector_nest.cpp new file mode 100644 index 00000000..a0cb76c6 --- /dev/null +++ b/test/sequence/vector_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 vector +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/support/pair_nest.cpp b/test/support/pair_nest.cpp new file mode 100644 index 00000000..fbc253cb --- /dev/null +++ b/test/support/pair_nest.cpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2015 Kohei Takahashi + + 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 + +using namespace boost::fusion; + +template +void copy() +{ + pair src; + pair dest = src; + boost::ignore_unused(dest); +} + +int main() +{ + copy >(); +} +