Boost logo

Boost Users :

Subject: Re: [Boost-users] issue with make_shared
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-03-21 10:08:30


On 21 Mar 2011, at 21:59, Sean Farrow wrote:

> Hi:
> Ok, having got to grips with fusion, and thought it was working. I now have an issue whereby when using make_shared, it is working in one case, and not in the other.
> I've got the following definition:P
> typedef boost::fusion::vector<PmStream*, MIDIInputThread, boost::shared_ptr<boost::asio::io_service> , boost::shared_ptr<boost::thread> > InputType;
> and when I use:
> InputType NewInput =InputType(Port, cl, boost::make_shared<boost::asio::io_service> , boost::make_shared<boost::thread>(boost::bind(&boost::asio::io_service::run, io.get())));

Assuming you have cut+pasted your code, you need () at the end, as make_shared is a function call.

> boost::make_shared<boost::asio::io_service>()

If that isn't your problem, a small ( ~ 20 lines, 10 if possible) program which compiles (except the one line you are having trouble with) showing your problem would be useful.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net