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

Ovanes,
thanks for your help, but this issue is still alive ;)
Sorry for the confusion. I Should hav eread your mail correctly - doh!
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.
participants (2)
-
Hartmut Kaiser
-
Ovanes Markarian