diff --git a/ChangeLog b/ChangeLog index f3522b9..6fb61cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -180,6 +180,9 @@ Boost V1.34.0 generation of a #line directive. - Worked around a linker issue for the True64/CXX compiler, complaining about multiple defined symbols when using the flex_string class. +- Added the is_macro_defined(name) function to the context object as described + in the documentation. This function is usable with any string type compatible + with std::string. Sat Feb 18 2005 - Version 1.2.3 diff --git a/include/boost/wave/cpp_context.hpp b/include/boost/wave/cpp_context.hpp index 759777f..fc5edf4 100644 --- a/include/boost/wave/cpp_context.hpp +++ b/include/boost/wave/cpp_context.hpp @@ -190,6 +190,9 @@ public: bool is_predefined = false) { return macros.add_macro(name, has_params, parameters, definition, is_predefined); } + template + bool is_defined_macro(StringT const &str) + { return macros.is_defined(str.begin(), str.end()); } template bool is_defined_macro(IteratorT2 const &begin, IteratorT2 const &end) { return macros.is_defined(begin, end); } @@ -214,12 +217,13 @@ public: void reset_macro_definitions() { macros.reset_macromap(); macros.init_predefined_macros(); } -// get the pp-iterator version information +// get the Wave version information static std::string get_version() { return boost::wave::util::predefined_macros::get_fullversion(false); } static std::string get_version_string() { return boost::wave::util::predefined_macros::get_versionstr(false); } +// access current language options void set_language(boost::wave::language_support language_, bool reset_macros = true) { @@ -285,7 +289,7 @@ protected: // expand_tokensequence(): // expands all macros contained in a given token sequence, handles '##' // and '#' pp operators and re-scans the resulting sequence -// (essentially preprocesses the token sequence). +// (essentially pre-processes the token sequence). // // The expand_undefined parameter is true during macro expansion inside // a C++ expression given for a #if or #elif statement. diff --git a/include/boost/wave/util/cpp_macromap.hpp b/include/boost/wave/util/cpp_macromap.hpp index b8ca315..319810d 100644 --- a/include/boost/wave/util/cpp_macromap.hpp +++ b/include/boost/wave/util/cpp_macromap.hpp @@ -375,7 +375,7 @@ token_id id = token_id(*begin); } IteratorT it = begin; -string_type name ((*it).get_value()); +string_type name ((*it).get_value().c_str()); typename defined_macros_type::iterator cit(current_macros -> find(name)); if (++it != end) {