mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
Remove deprecated Boost.Bind global placeholders usage
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@@ -89,6 +89,7 @@ int main()
|
||||
}
|
||||
|
||||
{ // example using plain function with boost.bind
|
||||
using namespace boost::placeholders;
|
||||
std::string generated;
|
||||
std::back_insert_iterator<std::string> outiter(generated);
|
||||
|
||||
@@ -100,6 +101,7 @@ int main()
|
||||
}
|
||||
|
||||
{ // example using member function with boost.bind
|
||||
using namespace boost::placeholders;
|
||||
std::string generated;
|
||||
std::back_insert_iterator<std::string> outiter(generated);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
//[wcf_includes
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
//]
|
||||
|
||||
@@ -162,6 +162,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
// tokenize the given string, the bound functor gets invoked for each of
|
||||
// the matched tokens
|
||||
using boost::placeholders::_1;
|
||||
char const* first = str.c_str();
|
||||
char const* last = &first[str.size()];
|
||||
bool r = lex::tokenize(first, last, word_count_functor,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -76,6 +76,7 @@ int main()
|
||||
{ // example using boost.bind with a plain function
|
||||
|
||||
char const *first = "{44}", *last = first + std::strlen(first);
|
||||
using boost::placeholders::_1;
|
||||
//[tutorial_attach_actions3
|
||||
parse(first, last, '{' >> int_[boost::bind(&print, _1)] >> '}');
|
||||
//]
|
||||
@@ -84,6 +85,7 @@ int main()
|
||||
{ // example using boost.bind with a member function
|
||||
|
||||
char const *first = "{44}", *last = first + std::strlen(first);
|
||||
using boost::placeholders::_1;
|
||||
//[tutorial_attach_actions4
|
||||
writer w;
|
||||
parse(first, last, '{' >> int_[boost::bind(&writer::print, &w, _1)] >> '}');
|
||||
|
||||
Reference in New Issue
Block a user