• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2001-2011 Hartmut Kaiser
3     Copyright (c) 2011 Robert Nelson
4 
5     Distributed under the Boost Software License, Version 1.0. (See accompanying
6     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 
9 // These (compilation) tests verify that Proto's operator overloads do not
10 // trigger the corresponding operator overloads exposed by Fusion.
11 
12 #include <boost/fusion/tuple.hpp>
13 #include <boost/spirit/include/qi_operator.hpp>
14 #include <boost/spirit/include/qi_eps.hpp>
15 #include <boost/spirit/include/qi_nonterminal.hpp>
16 #include <boost/phoenix/core/reference.hpp>
17 #include <string>
18 
main()19 int main()
20 {
21     namespace qi = boost::spirit::qi;
22 
23     static qi::rule<std::string::const_iterator> const a;
24     static qi::rule<std::string::const_iterator> const b;
25     qi::rule<std::string::const_iterator> rule = a > b;
26 
27     int vars;
28     qi::rule<std::string::const_iterator, int(const int&)> const r;
29     qi::rule<std::string::const_iterator, int()> r2 =
30         r(boost::phoenix::ref(vars)) > qi::eps;
31 }
32