Re: [Boost-users] [boost::wave] Finding out if a macro is defined
Hartmut, thanks for your help, but this issue is still alive ;) Just to be sure I did everything right, I took the entire head revision of boost and compiled it. I had no problems in the relevant libs. I also saw your changes in the cpp_context.hpp. The only problems I still get compiler errors using the flexi_string as described before. May usage scenario: token_type::string_type str("some string"); if(ctx.is_defined_macro(str)) { ... } There is still the iterator derefernece compiler error in the cpp_macromap.hpp: e:\boost\include\boost-1_35\boost\wave\util\cpp_macromap.hpp(396) : error C2228: left of '.get_value' must have class/struct/union type is 'const char' e:\boost\include\boost-1_35\boost\wave\cpp_context.hpp(198) : see reference to function template instantiation 'bool boost::wave::util::macromap<ContextT>::is_defined<const char*>(const IteratorT &,const IteratorT &)' being compiled with [ ContextT=boost::wave::context<token_groups::str_iter_type,token_groups::lex_iter_type>, IteratorT=const char * ] e:\projects\inpecting_wave\inpecting_wave\header_processor.cpp(178) : see reference to function template instantiation 'bool boost::wave::context<IteratorT,LexIteratorT>::is_defined_macro<boost::wave::cpplexer::lex_token<>::string_type>(const StringT &)' being compiled with [ IteratorT=token_groups::str_iter_type, LexIteratorT=token_groups::lex_iter_type, StringT=boost::wave::cpplexer::lex_token<>::string_type ] e:\boost\include\boost-1_35\boost\wave\util\cpp_macromap.hpp(396) : error C2228: left of '.c_str' must have class/struct/union the line: string_type name ((*it).get_value().c_str()); Still tries to call get_value on const char type. With Kind Regards, Ovanes
Ovanes,
thanks for your help, but this issue is still alive ;)
Sorry for the confusion. I Should hav eread your mail correctly - doh!
Just to be sure I did everything right, I took the entire head revision of boost and compiled it. I had no problems in the relevant libs.
I also saw your changes in the cpp_context.hpp. The only problems I still get compiler errors using the flexi_string as described before. May usage scenario:
I did two things: - I reverted my changes from the upcoming release branch. I don't want to risk to break anything there. As it turns out, even small changes may have significant impact... - The CVS::HEAD branch now contains a fixed version correctly implementing the functionality you have been asking for. The problem was, that the is_defined_macro function you were using was not designed to take string iterators, it is designed to take a token sequence as its parameters. But I added a separate function for your convenience taking just the string parameter as described in the docs. HTH Regards Hartmut PS: note that the changes I committed to the CVS::HEAD may take some time to show up in the anonymous checkout.
On Thu, March 8, 2007 15:09, Hartmut Kaiser wrote:
Ovanes,
thanks for your help, but this issue is still alive ;)
Sorry for the confusion. I Should hav eread your mail correctly - doh!
Just to be sure I did everything right, I took the entire head revision of boost and compiled it. I had no problems in the relevant libs.
I also saw your changes in the cpp_context.hpp. The only problems I still get compiler errors using the flexi_string as described before. May usage scenario:
I did two things: - I reverted my changes from the upcoming release branch. I don't want to risk to break anything there. As it turns out, even small changes may have significant impact... - The CVS::HEAD branch now contains a fixed version correctly implementing the functionality you have been asking for. The problem was, that the is_defined_macro function you were using was not designed to take string iterators, it is designed to take a token sequence as its parameters. But I added a separate function for your convenience taking just the string parameter as described in the docs.
HTH Regards Hartmut
PS: note that the changes I committed to the CVS::HEAD may take some time to show up in the anonymous checkout.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Many thanks! I will test it right now. With Kind Regards, Ovanes Markarian
participants (2)
-
Hartmut Kaiser
-
Ovanes Markarian