mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-30 20:47:31 +02:00
Add tests for issue 11932.
https://svn.boost.org/trac/boost/ticket/11932
This commit is contained in:
@ -79,6 +79,7 @@ project
|
|||||||
[ run sequence/hash.cpp ]
|
[ run sequence/hash.cpp ]
|
||||||
[ run sequence/io.cpp ]
|
[ run sequence/io.cpp ]
|
||||||
[ run sequence/iterator_range.cpp ]
|
[ run sequence/iterator_range.cpp ]
|
||||||
|
[ compile sequence/issue11932.cpp ]
|
||||||
[ run sequence/joint_view.cpp ]
|
[ run sequence/joint_view.cpp ]
|
||||||
[ run sequence/list_comparison.cpp ]
|
[ run sequence/list_comparison.cpp ]
|
||||||
[ run sequence/list_construction.cpp ]
|
[ run sequence/list_construction.cpp ]
|
||||||
|
46
test/sequence/issue11932.cpp
Normal file
46
test/sequence/issue11932.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2016 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 <boost/config.hpp>
|
||||||
|
#include <boost/fusion/include/vector.hpp>
|
||||||
|
#include <boost/fusion/include/list.hpp>
|
||||||
|
#include <boost/fusion/include/deque.hpp>
|
||||||
|
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
#include <boost/fusion/include/boost_tuple.hpp>
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_CXX11_HDR_TUPLE
|
||||||
|
#include <tuple>
|
||||||
|
#include <boost/fusion/include/std_tuple.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/fusion/include/mpl.hpp>
|
||||||
|
#include <boost/mpl/transform.hpp>
|
||||||
|
|
||||||
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
#include <boost/mpl/assert.hpp>
|
||||||
|
|
||||||
|
struct left
|
||||||
|
{
|
||||||
|
template <typename L, typename> struct apply { typedef L type; };
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Seq> struct test
|
||||||
|
{
|
||||||
|
typedef typename boost::mpl::transform<Seq, Seq, left>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
using namespace boost::fusion;
|
||||||
|
BOOST_MPL_ASSERT((boost::is_same<test<boost::fusion::vector<> >::type, boost::fusion::vector<> >));
|
||||||
|
BOOST_MPL_ASSERT((boost::is_same<test<boost::fusion::list<> >::type, boost::fusion::list<> >));
|
||||||
|
BOOST_MPL_ASSERT((boost::is_same<test<boost::fusion::deque<> >::type, boost::fusion::deque<> >));
|
||||||
|
|
||||||
|
BOOST_MPL_ASSERT((boost::is_same<test<boost::tuples::tuple<> >::type, boost::tuples::tuple<> >));
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_CXX11_HDR_TUPLE
|
||||||
|
BOOST_MPL_ASSERT((boost::is_same<test<std::tuple<> >::type, std::tuple<> >));
|
||||||
|
#endif
|
Reference in New Issue
Block a user