regression_debug_optional.cpp 668 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2010 Carl Philipp Reh
  2. // Copyright (c) 2001-2010 Hartmut Kaiser
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. // make sure optionals play well with debug output
  7. #define BOOST_SPIRIT_DEBUG
  8. #include <boost/detail/lightweight_test.hpp>
  9. #include <boost/spirit/include/qi.hpp>
  10. #include <boost/spirit/home/support/attributes.hpp>
  11. #include <boost/optional.hpp>
  12. int main()
  13. {
  14. boost::spirit::qi::rule<
  15. char const *,
  16. boost::optional<int>()
  17. > foo;
  18. BOOST_SPIRIT_DEBUG_NODE(foo);
  19. return boost::report_errors();
  20. }