diff --git a/include/boost/fusion/algorithm/auxiliary/move.hpp b/include/boost/fusion/algorithm/auxiliary/move.hpp index 76ff4692..e7b9c9ae 100644 --- a/include/boost/fusion/algorithm/auxiliary/move.hpp +++ b/include/boost/fusion/algorithm/auxiliary/move.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #if defined (BOOST_MSVC) # pragma warning(push) diff --git a/test/Jamfile b/test/Jamfile index dd961972..5036ab07 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -32,6 +32,7 @@ project [ run algorithm/insert.cpp : : : : ] [ run algorithm/insert_range.cpp : : : : ] [ run algorithm/iter_fold.cpp : : : : ] + [ run algorithm/move.cpp : : : : ] [ run algorithm/none.cpp : : : : ] [ run algorithm/pop_back.cpp : : : : ] [ run algorithm/pop_front.cpp : : : : ] diff --git a/test/algorithm/move.cpp b/test/algorithm/move.cpp new file mode 100644 index 00000000..ac9ffed2 --- /dev/null +++ b/test/algorithm/move.cpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2014 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 + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +#include +#include +#include +#include +#include +#include + +int main() +{ + { + boost::fusion::vector v(1, 2, 3); + boost::fusion::list l1 = v; + boost::fusion::list l2; + + boost::fusion::move(std::move(v), l2); + BOOST_TEST(l1 == l2); + } + + return boost::report_errors(); +} + +#else + +int main() +{ + // no thing to do +} + +#endif +