mirror of
https://github.com/boostorg/wave.git
synced 2026-01-24 06:22:15 +00:00
Added is_macro_defined() as described in the docs.
[SVN r37148]
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -190,6 +190,9 @@ public:
|
||||
bool is_predefined = false)
|
||||
{ return macros.add_macro(name, has_params, parameters, definition,
|
||||
is_predefined); }
|
||||
template <typename StringT>
|
||||
bool is_defined_macro(StringT const &str)
|
||||
{ return macros.is_defined(str.begin(), str.end()); }
|
||||
template <typename IteratorT2>
|
||||
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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user