regression_attr_with_action.cpp 665 B

123456789101112131415161718192021222324252627
  1. // Copyright (c) 2010 Daniel James
  2. // Copyright (c) 2001-2011 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. // this is a compile only regression test
  7. #include <boost/config/warning_disable.hpp>
  8. #include <boost/spirit/include/qi.hpp>
  9. namespace qi = boost::spirit::qi;
  10. struct source_mode {};
  11. struct process_type
  12. {
  13. template <typename A, typename B, typename C>
  14. void operator()(A&, B&, C&) const {}
  15. };
  16. int main()
  17. {
  18. process_type process;
  19. qi::rule<char const*> x = qi::attr(source_mode()) [process];
  20. return 0;
  21. }