Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace make_shared with new in some cases #810

Closed
wants to merge 4 commits into from
Closed

Replace make_shared with new in some cases #810

wants to merge 4 commits into from

Conversation

stefan-floeren
Copy link
Contributor

@stefan-floeren stefan-floeren commented Apr 16, 2019

Replace make_shared for asio types that take a lib::ref as a parameter.
This should fix the ASIO change (boostorg/asio@59066d8) for 1.70,
while keeping it backwards compatible to older boost versions.

Fixes #794
Fixes #808

c72578 and others added 3 commits November 1, 2018 20:58
Update version number in CMakeLists.txt to 0.8.1
Replace make_shared for asio types that take a lib::ref as a parameter.
This should fix the ASIO change (boostorg/asio@59066d8) for 1.70,
while keeping it backwards compatible to older boost versions.
@cameron-rowe
Copy link

When building against boost 1.70, our team still had issues with the lib::ref on endpoint.hpp line 856. Removing the lib::ref allowed it to compile for us.

Here is what we changed it to.
m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(*m_io_service);

@stefan-floeren
Copy link
Contributor Author

Sorry, missed to add those. Should be fixed now.

For the reasoning between new and make_shared, check boostorg/asio@59066d8#commitcomment-32667434 and following.

@stefan-floeren
Copy link
Contributor Author

I cite the linked comment:

That won't work with boost::make_shared and pre-C++11 compilers. On those compilers make_shared forwards parameters by const reference

@toonetown
Copy link

Is there any progress on this getting merged?

toonetown added a commit to toonetown/build-websocketpp that referenced this pull request Apr 20, 2019
@yurivict
Copy link

What stops this from being merged?

@yurivict
Copy link

@zaphoyd Could you please merge this PR and make a release?

Thank you,
Yuri

@zaphoyd
Copy link
Owner

zaphoyd commented Apr 24, 2019

Can you open this against the develop branch?

@stefan-floeren stefan-floeren changed the base branch from master to develop April 24, 2019 11:13
@stefan-floeren stefan-floeren changed the base branch from develop to master April 24, 2019 11:13
@stefan-floeren stefan-floeren changed the base branch from master to develop April 24, 2019 11:15
@stefan-floeren
Copy link
Contributor Author

see #814

rfric pushed a commit to DECENTfoundation/websocketpp that referenced this pull request Jun 10, 2019
@LimingFang
Copy link

wow, awesome!!! I've waste hours to fix this problem until I saw your commit
thx man.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants