From 077f211f2f047b6692c84ec242c3187369d3f91e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 9 Feb 2005 13:16:39 +0000 Subject: [PATCH] Compiler specific fixes and workarounds. [SVN r27273] --- example/grep/grep.cpp | 4 ++-- example/snippets/partial_regex_grep.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/example/grep/grep.cpp b/example/grep/grep.cpp index 32f6a142..c181d8fa 100644 --- a/example/grep/grep.cpp +++ b/example/grep/grep.cpp @@ -127,8 +127,8 @@ int main(int argc, char * argv[]) p.add("input-file", -1); po::variables_map vm; - store(po::command_line_parser(argc, argv).options(cmdline_options)/*.options(hidden)*/.positional(p).run(), vm); - notify(vm); + po::store(po::command_line_parser(argc, argv).options(cmdline_options)/*.options(hidden)*/.positional(p).run(), vm); + po::notify(vm); if (vm.count("help")) { diff --git a/example/snippets/partial_regex_grep.cpp b/example/snippets/partial_regex_grep.cpp index aba09113..c3deda56 100644 --- a/example/snippets/partial_regex_grep.cpp +++ b/example/snippets/partial_regex_grep.cpp @@ -20,8 +20,13 @@ #include #include #include +#include #include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ using ::memmove; } +#endif + // match some kind of html tag: boost::regex e("<[^>]*>"); // count how many: @@ -53,7 +58,7 @@ void search(std::istream& is) // and how much is left to fill: unsigned size = next_pos - buf; // copy forward whatever we have left: - memmove(buf, next_pos, leftover); + std::memmove(buf, next_pos, leftover); // fill the rest from the stream: is.read(buf + leftover, size); unsigned read = is.gcount();