2006-12-18 22:36:43 +00:00
|
|
|
/*=============================================================================
|
2008-06-28 13:45:21 +00:00
|
|
|
Copyright (c) 1999-2003 Jaakko Jarvi
|
2011-09-16 05:27:16 +00:00
|
|
|
Copyright (c) 2001-2011 Joel de Guzman
|
2006-12-18 22:36:43 +00:00
|
|
|
Copyright (c) 2006 Dan Marsden
|
|
|
|
|
2012-08-31 14:32:08 +00:00
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
2007-03-02 10:44:14 +00:00
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2006-12-18 22:36:43 +00:00
|
|
|
==============================================================================*/
|
2007-10-24 02:32:28 +00:00
|
|
|
#include <boost/fusion/container/deque/deque.hpp>
|
2007-11-06 12:13:52 +00:00
|
|
|
#include <boost/fusion/container/generation/make_deque.hpp>
|
|
|
|
#include <boost/fusion/container/generation/deque_tie.hpp>
|
2006-12-18 22:36:43 +00:00
|
|
|
|
|
|
|
#define FUSION_SEQUENCE deque
|
|
|
|
#include "copy.hpp"
|
|
|
|
|
2016-08-21 16:59:04 -04:00
|
|
|
using namespace test_detail;
|
|
|
|
|
|
|
|
// c++11 deque has bug, cannot properly copy-assign from a const value
|
|
|
|
template <typename T>
|
|
|
|
struct skip_const_lvalue_assignment
|
|
|
|
{
|
|
|
|
template <typename Source, typename Expected>
|
|
|
|
bool operator()(Source const& source, Expected const& expected) const
|
|
|
|
{
|
|
|
|
return
|
|
|
|
run< can_implicit_construct<T> >(source, expected) &&
|
|
|
|
run< can_construct<T> >(source, expected) &&
|
|
|
|
run< can_rvalue_assign<T> >(source, expected) &&
|
|
|
|
run< can_lvalue_assign<T> >(source, expected);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2006-12-18 22:36:43 +00:00
|
|
|
int
|
|
|
|
main()
|
|
|
|
{
|
2016-08-21 16:59:04 -04:00
|
|
|
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
|
|
|
|
test<skip_const_lvalue_assignment>();
|
|
|
|
#else
|
|
|
|
test<can_copy>();
|
|
|
|
#endif
|
2006-12-18 22:36:43 +00:00
|
|
|
return boost::report_errors();
|
|
|
|
}
|