forked from boostorg/regex
Moved static stables into the function bodies to fix a gcc on MacOS X and IMB compiler bug.
Fixed config system for dll builds - the default linkage option is now static linking. Fixed makefiles - dll builds now work. Added Misc fixes for the example programs. [SVN r19044]
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
@ -87,10 +88,17 @@ void class_index::IndexClasses(const std::string& file)
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) && !defined(_STLP_VERSION)
|
||||
boost::regex_grep(std::bind1st(std::mem_fun1(&class_index::grep_callback), this),
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
#else
|
||||
boost::regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this),
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -138,3 +146,4 @@ int main(int argc, const char** argv)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
@ -44,7 +45,7 @@ int process_ftp(const char* response, std::string* msg)
|
||||
// what[3] contains the text message.
|
||||
if(msg)
|
||||
msg->assign(what[3].first, what[3].second);
|
||||
return atoi(what[1].first);
|
||||
return ::atoi(what[1].first);
|
||||
}
|
||||
// failure did not match
|
||||
if(msg)
|
||||
@ -104,3 +105,4 @@ int main(int argc)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user