vector_traits.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*=============================================================================
  2. Copyright (C) 2016 Lee Clagett
  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/detail/lightweight_test.hpp>
  7. #include <boost/fusion/container/list.hpp>
  8. #include <boost/fusion/container/vector.hpp>
  9. #define FUSION_SEQUENCE boost::fusion::vector
  10. #define FUSION_ALT_SEQUENCE boost::fusion::list
  11. #include "traits.hpp"
  12. int main() {
  13. test_convertible(true /* has conversion construction */ );
  14. // C++11 models overly aggressive (bug) implicit conversion from C++03
  15. BOOST_TEST((
  16. is_convertible<
  17. boost::fusion::list<int>
  18. , boost::fusion::vector< boost::fusion::list<int> >
  19. >(true)
  20. ));
  21. #if defined(FUSION_TEST_HAS_CONSTRUCTIBLE)
  22. test_constructible();
  23. #endif
  24. return boost::report_errors();
  25. }