• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 1999-2003 Jaakko Jarvi
3     Copyright (c) 2001-2011 Joel de Guzman
4     Copyright (c) 2006 Dan Marsden
5 
6     Distributed under the Boost Software License, Version 1.0. (See accompanying
7     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
9 #include <boost/fusion/container/deque/deque.hpp>
10 #include <boost/fusion/container/generation/make_deque.hpp>
11 #include <boost/fusion/container/generation/deque_tie.hpp>
12 
13 #define FUSION_SEQUENCE deque
14 #include "copy.hpp"
15 
16 using namespace test_detail;
17 
18 // c++11 deque has bug, cannot properly copy-assign from a const value
19 template <typename T>
20 struct skip_const_lvalue_assignment
21 {
22     template <typename Source, typename Expected>
operator ()skip_const_lvalue_assignment23     bool operator()(Source const& source, Expected const& expected) const
24     {
25         return
26             run< can_implicit_construct<T> >(source, expected) &&
27             run< can_construct<T> >(source, expected) &&
28             run< can_rvalue_assign<T> >(source, expected) &&
29             run< can_lvalue_assign<T> >(source, expected);
30     }
31 };
32 
33 int
main()34 main()
35 {
36 #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
37     test<skip_const_lvalue_assignment>();
38 #else
39     test<can_copy>();
40 #endif
41     return boost::report_errors();
42 }
43