Opened 10 years ago

Closed 9 years ago

#8469 closed Bugs (fixed)

compiler errors with gcc in c++11 mode from bind and shared_ptr

Reported by: fyter@… Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost 1.51.0 Severity: Problem
Keywords: bind shared_ptr c++11 Cc:

Description

#include <boost/asio.hpp> #include <boost/bind.hpp> #include <boost/enable_shared_from_this.hpp>

boost::asio::io_service io;

class test : public boost::enable_shared_from_this<test> { public:

void process(){} void start() {

io.post(bind(&test::process, shared_from_this()));

}

};

int main() { }

---------------end ---------------------- c++ test.cpp -lboost_system -std=c++11

....io_service.ipp: In instantiation of .... io_service.ipp:126:3: error: use of deleted function 'boost::_bi::bind_t<.....'.......

Attachments (1)

QQ截图20130422144925.png (11.7 KB ) - added by fyter 10 years ago.

Download all attachments as: .zip

Change History (8)

by fyter, 10 years ago

Attachment: QQ截图20130422144925.png added

comment:1 by anonymous, 10 years ago

gcc 4.8

comment:2 by anonymous, 10 years ago

Component: Noneasio
Owner: set to chris_kohlhoff

comment:3 by anonymous, 10 years ago

Component: asiobind
Owner: changed from chris_kohlhoff to Peter Dimov

comment:4 by Peter Dimov, 10 years ago

Is this still a problem with Boost 1.52 or 1.53?

comment:5 by anonymous, 10 years ago

I am going to try now.

comment:6 by anonymous, 10 years ago

1.53 is ok,thks!

comment:7 by Peter Dimov, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.