Skip to content

X3: Improve situation with move only types - #472

Merged
Kojoley merged 5 commits into
boostorg:developfrom
Kojoley:x3-improve-situation-with-move-only-types
Feb 27, 2019
Merged

X3: Improve situation with move only types#472
Kojoley merged 5 commits into
boostorg:developfrom
Kojoley:x3-improve-situation-with-move-only-types

Conversation

@Kojoley

@Kojoley Kojoley commented Feb 26, 2019

Copy link
Copy Markdown
Collaborator

Closes #465

@djowel

djowel commented Feb 27, 2019

Copy link
Copy Markdown
Collaborator

Nice, as usual!

@Kojoley
Kojoley merged commit 3253702 into boostorg:develop Feb 27, 2019
@Kojoley
Kojoley deleted the x3-improve-situation-with-move-only-types branch February 27, 2019 16:15
inline bool push_back(Container& c, T&& val)
{
return push_back_container<Container>::call(c, std::move(val));
return push_back_container<Container>::call(c, static_cast<T&&>(val));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason behind such changes? Reducing use of standard library (compile time)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed surprising move of lvalue. And yes, std::forward is not zero cost in terms of compile time (also a surprising thing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants