unpaired.cpp 726 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/metaparse/error/unpaired.hpp>
  6. #include <boost/mpl/assert.hpp>
  7. #include <boost/type_traits/is_same.hpp>
  8. #include "test_case.hpp"
  9. namespace
  10. {
  11. struct some_tmp_value
  12. {
  13. typedef some_tmp_value type;
  14. };
  15. }
  16. BOOST_METAPARSE_TEST_CASE(unpaired)
  17. {
  18. using boost::metaparse::error::unpaired;
  19. using boost::is_same;
  20. // test_unpaired_currying
  21. BOOST_MPL_ASSERT((
  22. is_same<
  23. unpaired<1, 2, some_tmp_value>,
  24. unpaired<1, 2>::apply<some_tmp_value>::type
  25. >
  26. ));
  27. }