deque_nest.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*=============================================================================
  2. Copyright (C) 2015 Kohei Takahshi
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #include <boost/fusion/container/deque/deque.hpp>
  7. #include <boost/core/lightweight_test.hpp>
  8. #define FUSION_SEQUENCE boost::fusion::deque
  9. #include "nest.hpp"
  10. /* deque has a few issues:
  11. - sequence conversion constructor is explicit
  12. - assignment sequence conversion has bug in base class
  13. - c++11 direct assignment from lvalue has bug */
  14. template <typename T>
  15. struct skip_issues
  16. {
  17. template <typename Source, typename Expected>
  18. bool operator()(Source const& source, Expected const& expected) const
  19. {
  20. using namespace test_detail;
  21. return
  22. #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
  23. run< can_construct<T> >(source, expected) &&
  24. run< can_implicit_construct<T> >(source, expected) &&
  25. run< can_rvalue_assign<T> >(source, expected) &&
  26. run< can_convert_using<can_construct>::to<T> >(source, expected) &&
  27. #else
  28. run< can_copy<T> >(source, expected) &&
  29. #endif
  30. run< can_construct_from_elements<T> >(source, expected);
  31. }
  32. };
  33. int
  34. main()
  35. {
  36. test<skip_issues>();
  37. return boost::report_errors();
  38. }