Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker issue with move constructors on MSVC #918

Merged
merged 1 commit into from
Jun 23, 2017

Conversation

dean0x7d
Copy link
Member

Fixes the issue as described in the comments of commit e27ea47.

This just adds enable_if_t<std::is_move_constructible<T>::value> to make_move_constructor. The change fixes MSVC and is harmless with other compilers. A few line breaks are also added to make the functions easier to read.

@r-englund Can you verify that this fixes the issue for you?

Fixes the issue as described in the comments of commit e27ea47. This
just adds `enable_if_t<std::is_move_constructible<T>::value>` to
`make_move_constructor`. The change fixes MSVC and is harmless with
other compilers.
dean0x7d referenced this pull request Jun 23, 2017
MSVC 2015 Update 3 and 2017 can handle enough expression SFINAE
to make this work now.
Copy link

@r-englund r-englund left a comment

Choose a reason for hiding this comment

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

This updated does indeed fixes our linking issues.
The build without this changed failed with the same link error as described in e27ea47, after applying this change, the errors went away

@dean0x7d
Copy link
Member Author

Thanks for the confirmation @r-englund.

@dean0x7d dean0x7d merged commit ce7024f into pybind:master Jun 23, 2017
@dean0x7d dean0x7d deleted the op-new branch June 24, 2017 22:33
@dean0x7d dean0x7d modified the milestone: v2.2 Aug 13, 2017
@rwgk rwgk mentioned this pull request Feb 9, 2023
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.

None yet

3 participants