tuple_nest.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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/tuple/tuple.hpp>
  7. #include <boost/core/lightweight_test.hpp>
  8. #define FUSION_SEQUENCE boost::fusion::tuple
  9. #include "nest.hpp"
  10. // tuple does not support conversion construction from sequence by design
  11. template <typename T>
  12. struct skip_constructor_conversion
  13. {
  14. template <typename Source, typename Expected>
  15. bool operator()(Source const& source, Expected const& expected) const
  16. {
  17. using namespace test_detail;
  18. return
  19. run< can_copy<T> >(source, expected) &&
  20. run< can_convert_using<can_assign>::to<T> >(source, expected) &&
  21. run< can_construct_from_elements<T> >(source, expected);
  22. }
  23. };
  24. int
  25. main()
  26. {
  27. test<skip_constructor_conversion>();
  28. return boost::report_errors();
  29. }