Hello,
The code below fails under Windows with the following message (sorry in
French, I don't know how to force Visual C++ to work in English). This is
under Windows. It works under Linux
I use Boost 1.47 with cmake and Visual C++ 2008 uner Windows and Boost 1.46
and gcc 4.6.1 under Linux.
The assertion in boost grammar.hpp is accompanied by this comment:
// If you see the assertion below failing then the start rule
// passed to the constructor of the grammar is not compatible with
// the grammar (i.e. it uses different template parameters).
but I don't understand how to interpret it in my case...
Any idea ?
Regards,
Gaël
Code:
typedef BOOST_TYPEOF(skipper) skipper_type;
template <typename Iterator>
struct charchart_parser : qi::grammar
{
charchart_parser() : charchart_parser::base_type(start)
{
using qi::eps;
using qi::lit;
using qi::_val;
using qi::_1;
using ascii::char_;
using ascii::space_type;
using qi::lexeme;
using qi::alnum;
using qi::hex;
using qi::eol;
start %= classes >> chars ;
<OTHER GRAMMAR RULES>
}
qi::rule start;
<OTHER RULES DECLARATIONS>
};
Messages:
C:\PROGRA~1\boost\BOOST_~1\boost/spirit/home/qi/nonterminal/grammar.hpp(77) :
error C2664: 'boost::mpl::assertion_failed'ÿ: impossible de convertir le
paramŠtre 1 de 'boost::mpl::failed ************(__thiscall
boost::spirit::qi::grammar::{ctor}::incompatible_start_rule::*
***********)
(boost::spirit::qi::rule)'
en 'boost::mpl::assert<false>::type'
with
[
Iterator=iterator_type,
T1=FrCeaLic2m::LinguisticProcessing::FlatTokenizer::charchart
(void),
T2=FrCeaLic2m::LinguisticProcessing::FlatTokenizer::skipper_type,
Elements=boost::fusion::consboost::spirit::tag::space,boost::spirit::char_encoding::standard>,boost::fusion::consboost::spirit::char_encoding::standard,true,false,boost::fusion::consboost::spirit::tag::char_,boost::spirit::char_encoding::ascii>,boost::spirit::qi::eol_parser>>,boost::fusion::consboost::spirit::qi::eol_parser,boost::fusion::nil>>>,boost::fusion::nil>>
]
Aucun constructeur n'a pu prendre le type de source, ou la r‚solution
de la surcharge du constructeur ‚tait ambigu‰
z:
\projets\moteurmultimedia\mm_linguisticprocessing\src\linguisticprocessing\core\flattokenizer\SpiritCharChartParser.hpp(132)ÿ:
voir la r‚f‚rence … l'instanciation de la fonction modŠle
'boost::spirit::qi::grammar::grammar(const
boost::spirit::qi::rule
&,const std::string &)' en cours de compilation
with
[
Iterator=iterator_type,
T1=FrCeaLic2m::LinguisticProcessing::FlatTokenizer::charchart
(void),
T2=FrCeaLic2m::LinguisticProcessing::FlatTokenizer::skipper_type,
Elements=boost::fusion::consboost::spirit::tag::space,boost::spirit::char_encoding::standard>,boost::fusion::consboost::spirit::char_encoding::standard,true,false,boost::fusion::consboost::spirit::tag::char_,boost::spirit::char_encoding::ascii>,boost::spirit::qi::eol_parser>>,boost::fusion::consboost::spirit::qi::eol_parser,boost::fusion::nil>>>,boost::fusion::nil>>
]
z:
\projets\moteurmultimedia\mm_linguisticprocessing\src\linguisticprocessing\core\flattokenizer\SpiritCharChartParser.hpp(131)ÿ:
lors de la compilation de la fonction membre '<Inconnu>' de la classe
<Inconnu>
Z:
\Projets\MoteurMultimedia\mm_linguisticprocessing\src\linguisticProcessing\core\FlatTokenizer\CharChart.cpp(303)ÿ:
voir la r‚f‚rence … l'instanciation de la classe modŠle
'FrCeaLic2m::LinguisticProcessing::FlatTokenizer::charchart_parser<Iterator>'
en cours de compilation
with
[
Iterator=iterator_type
]
--
Gael de Chalendar
CEA LIST
Centre de Fontenay-aux-Roses
Laboratoire Vision et Ingénierie des Contenus
(Vision and Content Engineering Laboratory)
Bat. 38-2 ; 18, rue du Panorama ; BP 6
92265 Fontenay aux Roses Cedex ; France
Tél.:01.46.54.80.18 ; Fax.:01.46.54.75.80
Email : Gael.D.O.T.de-Chalendar.A@T.cea.D.O.T.fr