title: Boost.Spirit compiler error
body: <pre><code>#include &lt;boost/spirit/include/qi.hpp&gt;
  #include &lt;boost/fusion/include/adapt_struct.hpp&gt;
  
  #include &lt;iostream&gt;
  
  namespace qi = boost::spirit::qi;
  template &lt;typename Iterator&gt;
  struct CommandGrammar : qi::grammar&lt;Iterator, std::string(), qi::space_type&gt;
  {
      CommandGrammar()
          : CommandGrammar::base_type(text)
      {
          using qi::lexeme;
          using qi::char_;
          using qi::space;
  
          specialSymbols %= (char_('-') | char_('{') | char_('}') 
                  | char_('[') | char_(']') | char_('|') | space);
          text %= *space &gt;&gt; lexeme[+(char_ - specialSymbols)] &gt;&gt; *space;
     }
  
      qi::rule&lt;Iterator, char(), qi::space_type&gt; specialSymbols;
      qi::rule&lt;Iterator, std::string(), qi::space_type&gt; text;
  };
  
  int main() 
  {
      std::cout &lt;&lt; "&gt;";
      std::string usage;
      std::getline(std::cin, usage);
      CommandGrammar&lt;std::string::const_iterator&gt; commandGrammar;
  
      std::string::const_iterator iter = usage.begin();
      std::string::const_iterator end = usage.end();
  
      std::string result;
      bool r = qi::phrase_parse(iter, end, commandGrammar, qi::space, result);
      if (r &amp;&amp; iter == end) {
          std::cout &lt;&lt; result;
          std::cout &lt;&lt; std::endl;
      } else {
          std::cout &lt;&lt; "fail" &lt;&lt; std::endl;
          std::cout &lt;&lt; std::string(iter, end) &lt;&lt; std::endl;
      }
  }
  </code></pre>
  
  <p>I need help to find the problem in this code. Here is part of error message:</p>
  
  <pre><code>In file included from /usr/include/boost/spirit/home/qi/nonterminal.hpp:14,                                                                                                                          
                   from /usr/include/boost/spirit/home/qi.hpp:19,                                                                                                                                      
                   from /usr/include/boost/spirit/include/qi.hpp:16,                                                                                                                                   
                   from main.cpp:1:                                                                                                                                                                    
  
  
  
  /usr/include/boost/fusion/algorithm/query/detail/any.hpp:55:   instantiated from bool boost::fusion::detail::any(const Sequence&amp;, F, Tag) [with Sequence = boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;, F = boost::spirit::qi::detail::pass_container&lt;boost::spirit::qi::detail::fail_function&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;, boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, Tag = boost::fusion::forward_traversal_tag]                                                                                                                                                                 
  /usr/include/boost/fusion/algorithm/query/any.hpp:30:   instantiated from bool boost::fusion::any(const Sequence&amp;, F) [with Sequence = boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;, F = boost::spirit::qi::detail::pass_container&lt;boost::spirit::qi::detail::fail_function&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;, boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;]                            
  /usr/include/boost/spirit/home/qi/operator/sequence_base.hpp:97:   instantiated from bool boost::spirit::qi::sequence_base&lt;Derived, Elements&gt;::parse_impl(Iterator&amp;, const Iterator&amp;, Context&amp;, const Skipper&amp;, Attribute&amp;, mpl_::true_) const [with Iterator = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, Context = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;, Skipper = boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, Attribute = std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, Derived = boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, Elements = boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;]                                                                  
  /usr/include/boost/spirit/home/qi/operator/sequence_base.hpp:115:   instantiated from bool boost::spirit::qi::sequence_base&lt;Derived, Elements&gt;::parse(Iterator&amp;, const Iterator&amp;, Context&amp;, const Skipper&amp;, Attribute&amp;) const [with Iterator = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, Context = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;, Skipper = boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, Attribute = std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, Derived = boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, Elements = boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;]                                                                                   
  /usr/include/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp:73:   instantiated from bool boost::spirit::qi::detail::parser_binder&lt;Parser, mpl_::bool_&lt;true&gt; &gt;::operator()(Iterator&amp;, const Iterator&amp;, Context&amp;, const Skipper&amp;) const [with Iterator = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, Skipper = boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, Context = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;, Parser = boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;]         
  /usr/include/boost/function/function_template.hpp:132:   instantiated from static R boost::detail::function::function_obj_invoker4&lt;FunctionObj, R, T0, T1, T2, T3&gt;::invoke(boost::detail::function::function_buffer&amp;, T0, T1, T2, T3) [with FunctionObj = boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;true&gt; &gt;, R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]                   
  /usr/include/boost/function/function_template.hpp:913:   instantiated from void boost::function4&lt;R, T1, T2, T3, T4&gt;::assign_to(Functor) [with Functor = boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;true&gt; &gt;, R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]                                                                                                                     
  /usr/include/boost/function/function_template.hpp:722:   instantiated from boost::function4&lt;R, T1, T2, T3, T4&gt;::function4(Functor, typename boost::enable_if_c&lt;boost::type_traits::ice_not::value, int&gt;::type) [with Functor = boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;true&gt; &gt;, R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]
  /usr/include/boost/function/function_template.hpp:1064:   instantiated from boost::function&lt;R(T0, T1, T2, T3)&gt;::function(Functor, typename boost::enable_if_c&lt;boost::type_traits::ice_not::value, int&gt;::type) [with Functor = boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;true&gt; &gt;, R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]
  /usr/include/boost/function/function_template.hpp:1105:   instantiated from typename boost::enable_if_c&lt;boost::type_traits::ice_not::value, boost::function&lt;R(T0, T1, T2, T3)&gt;&amp;&gt;::type boost::function&lt;R(T0, T1, T2, T3)&gt;::operator=(Functor) [with Functor = boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::plus&lt;boost::spirit::qi::difference&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;, boost::spirit::qi::reference&lt;const boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt; &gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::kleene&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;true&gt; &gt;, R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]
  /usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:191:   instantiated from boost::spirit::qi::rule&lt;Iterator, T1, T2, T3&gt;&amp; boost::spirit::qi::operator%=(boost::spirit::qi::rule&lt;Iterator, T1, T2, T3&gt;&amp;, const Expr&amp;) [with Expr = boost::proto::exprns_::expr&lt;boost::proto::tag::shift_right, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::shift_right, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::dereference, boost::proto::argsns_::list1&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;&amp;&gt;, 1l&gt;&amp;, const boost::proto::exprns_::expr&lt;boost::proto::tag::subscript, boost::proto::argsns_::list2&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::lexeme&gt;, 0l&gt;&amp;, const boost::proto::exprns_::expr&lt;boost::proto::tag::unary_plus, boost::proto::argsns_::list1&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::minus, boost::proto::argsns_::list2&lt;const boost::spirit::terminal&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::char_, boost::spirit::char_encoding::standard&gt; &gt;&amp;, boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, char(), boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, boost::fusion::unused_type&gt;&amp;&gt;, 2l&gt;&amp;&gt;, 1l&gt;&amp;&gt;, 2l&gt;&amp;&gt;, 2l&gt;&amp;, const boost::proto::exprns_::expr&lt;boost::proto::tag::dereference, boost::proto::argsns_::list1&lt;const boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;&amp;&gt;, 1l&gt;&amp;&gt;, 2l&gt;, Iterator = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, T1 = std::string(), T2 = boost::proto::exprns_::expr&lt;boost::proto::tag::terminal, boost::proto::argsns_::term&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;, 0l&gt;, T3 = boost::fusion::unused_type]
  main.cpp:19:   instantiated from CommandGrammar&lt;Iterator&gt;::CommandGrammar() [with Iterator = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;]
  main.cpp:31:   instantiated from here
  /usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:236: error: no match for call to (const boost::function&lt;bool(__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, boost::spirit::context&lt;boost::fusion::cons&lt;char&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;)&gt;) (__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, boost::spirit::context&lt;boost::fusion::cons&lt;char&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, const boost::spirit::qi::detail::unused_skipper&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt; &gt;&amp;)
  /usr/include/boost/function/function_template.hpp:1006: note: candidates are: R boost::function4&lt;R, T1, T2, T3, T4&gt;::operator()(T0, T1, T2, T3) const [with R = bool, T0 = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T1 = const __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;&amp;, T2 = boost::spirit::context&lt;boost::fusion::cons&lt;char&amp;, boost::fusion::nil&gt;, boost::fusion::vector0&lt;void&gt; &gt;&amp;, T3 = const boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::standard&gt; &gt;&amp;]
  make: *** [all] Error 1
  </code></pre>