Boost logo

Boost Users :

Subject: [Boost-users] Is selective header including supposed to work?
From: Johannes Lorenz (johannes89_at_[hidden])
Date: 2014-04-12 09:47:23


I like Qi, but the compile times are terrible sometimes. My example is similar to this in [1], but it needs 3x as much time to compile. I thought this problem might be omitted by including selectively what is needed. So I went into [1] and replaced

  #include <boost/spirit/include/qi.hpp>


  #include <boost/spirit/include/qi_action.hpp>
  #include <boost/spirit/include/qi_grammar.hpp>
  #include <boost/spirit/include/qi_uint.hpp>
  #include <boost/spirit/include/qi_char.hpp> .

I got far, but then, there comes up a long error message, beginning like in [2].

My questions are:

  * is selectively including from "boost/spirit/include" supposed to work, or should this never be done?
  * if it should work, what is still left to be included in my case?

My version of boost is 1.53.
Many thanks on advance.

Kind regards,

[2] [...]/usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:176:13: error: no matching function for call to ‘assertion_failed[...]
/usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:176:13: note: candidate is:
/usr/include/boost/mpl/assert.hpp:79:5: note: template<bool C> int mpl_::assertion_failed(typename mpl_::assert<C>::type)
 int assertion_failed( typename assert<C>::type );
/usr/include/boost/mpl/assert.hpp:79:5: note: template argument deduction/substitution failed:[...]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at