Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replacing boost::bind and boost::enable_shared_form_this by std counterparts#230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 4 commits intocpp-netlib:masterfromtorbjoernk:remove-boost-bindshrd
Apr 14, 2013
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
also replaced boost::bind by std::bind in test cases now
  • Loading branch information
@torbjoernk
torbjoernk committedApr 13, 2013
commit358a035c8f182a283dd3bab5402ad35a152c4b1c
2 changes: 1 addition & 1 deletionhttp/test/server_async_less_copy.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ struct async_hello_world {
connection->set_headers(boost::make_iterator_range(headers, headers +4));
std::vector<boost::asio::const_buffer> iovec;
iovec.push_back(boost::asio::const_buffer(hello_world,13));
connection->write(iovec,boost::bind(&async_hello_world::error,this, _1));
connection->write(iovec,std::bind(&async_hello_world::error,this, _1));
}

voiderror(boost::system::error_codeconst& ec) {
Expand Down
26 changes: 13 additions & 13 deletionshttp/test/server_async_run_stop_concurrency.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,7 +46,7 @@ int main(int argc, char* argv[]) {
util::thread_pool pool;
async_serverserver_instance(ASYNC_SERVER_TEST_CONFIG);

boost::threadrunning_thread(boost::bind(&async_server::run,
boost::threadrunning_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

Expand All@@ -60,11 +60,11 @@ int main(int argc, char* argv[]) {
util::thread_pool pool;
async_serverserver_instance(ASYNC_SERVER_TEST_CONFIG);

boost::threadrunning_thread(boost::bind(&async_server::run,
boost::threadrunning_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadstopping_thread(boost::bind(&async_server::stop,
boost::threadstopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

Expand All@@ -78,19 +78,19 @@ int main(int argc, char* argv[]) {
util::thread_pool pool;
async_serverserver_instance(ASYNC_SERVER_TEST_CONFIG);

boost::threadrunning_thread(boost::bind(&async_server::run,
boost::threadrunning_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadstopping_thread(boost::bind(&async_server::stop,
boost::threadstopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadsecond_running_thread(boost::bind(&async_server::run,
boost::threadsecond_running_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadsecond_stopping_thread(boost::bind(&async_server::stop,
boost::threadsecond_stopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

Expand All@@ -106,15 +106,15 @@ int main(int argc, char* argv[]) {
util::thread_pool pool;
async_serverserver_instance(ASYNC_SERVER_TEST_CONFIG);

boost::threadrunning_thread(boost::bind(&async_server::run,
boost::threadrunning_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadsecond_running_thread(boost::bind(&async_server::run,
boost::threadsecond_running_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadstopping_thread(boost::bind(&async_server::stop,
boost::threadstopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

Expand All@@ -129,15 +129,15 @@ int main(int argc, char* argv[]) {
util::thread_pool pool;
async_serverserver_instance(ASYNC_SERVER_TEST_CONFIG);

boost::threadrunning_thread(boost::bind(&async_server::run,
boost::threadrunning_thread(std::bind(&async_server::run,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadstopping_thread(boost::bind(&async_server::stop,
boost::threadstopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

boost::threadsecond_stopping_thread(boost::bind(&async_server::stop,
boost::threadsecond_stopping_thread(std::bind(&async_server::stop,
&server_instance));
boost::this_thread::sleep(ASYNC_SERVER_SLEEP_TIME);

Expand Down
2 changes: 1 addition & 1 deletionhttp/test/server_include_inlined.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
if (argc >1)
port = argv[1];
serverserver_("127.0.0.1", port, handler, http::_reuse_address =true);
boost::threadrunner(boost::bind(&server::run, &server_));
boost::threadrunner(std::bind(&server::run, &server_));
try {
server_.stop();
runner.join();
Expand Down
15 changes: 8 additions & 7 deletionsmime/test/mime-roundtrip.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,8 @@
*/

#include<boost/mime.hpp>
#include<boost/bind.hpp>
// #include <boost/bind.hpp>
#include<functional>

#include<boost/test/included/unit_test.hpp>

Expand DownExpand Up@@ -83,15 +84,15 @@ using namespace boost::unit_test;
test_suite*
init_unit_test_suite(int argc,char* argv[] )
{
framework::master_test_suite().add (BOOST_TEST_CASE(boost::bind ( test_roundtrip,"TestMessages/00000001" )));
framework::master_test_suite().add (BOOST_TEST_CASE(boost::bind ( test_roundtrip,"TestMessages/00000019" )));
framework::master_test_suite().add (BOOST_TEST_CASE(boost::bind ( test_roundtrip,"TestMessages/00000431" )));
framework::master_test_suite().add (BOOST_TEST_CASE(boost::bind ( test_roundtrip,"TestMessages/00000975" )));
framework::master_test_suite().add (BOOST_TEST_CASE(std::bind ( test_roundtrip,"TestMessages/00000001" )));
framework::master_test_suite().add (BOOST_TEST_CASE(std::bind ( test_roundtrip,"TestMessages/00000019" )));
framework::master_test_suite().add (BOOST_TEST_CASE(std::bind ( test_roundtrip,"TestMessages/00000431" )));
framework::master_test_suite().add (BOOST_TEST_CASE(std::bind ( test_roundtrip,"TestMessages/00000975" )));

// Following test is removed because the file it used often tripped false-positives when scanned by virus checkers.
// framework::master_test_suite().add ( BOOST_TEST_CASE(boost::bind ( test_roundtrip, "TestMessages/00001136" )));
// framework::master_test_suite().add ( BOOST_TEST_CASE(std::bind ( test_roundtrip, "TestMessages/00001136" )));

//test cases that fail
// framework::master_test_suite().add ( BOOST_TEST_CASE(boost::bind ( test_roundtrip, "TestMessages/0019-NoBoundary" )));
// framework::master_test_suite().add ( BOOST_TEST_CASE(std::bind ( test_roundtrip, "TestMessages/0019-NoBoundary" )));
return0;
}

[8]ページ先頭

©2009-2025 Movatter.jp