Skip to content

Conversation

@wjakob
Copy link
Member

@wjakob wjakob commented Aug 28, 2017

See issue #1035

@wjakob wjakob changed the title make implicit conversions non-reentrant (fixes #1035) Make implicit conversions non-reentrant (fixes #1035) Aug 28, 2017
@wjakob wjakob force-pushed the master branch 2 times, most recently from d33d1c0 to b4b9c9d Compare August 28, 2017 11:45
@wjakob
Copy link
Member Author

wjakob commented Aug 28, 2017

Weird.. not sure I understand these CI failures.

@dean0x7d
Copy link
Member

dean0x7d commented Aug 28, 2017

Try an empty copy constructor instead of an explicitly defaulted one:

BogusImplicitConversion(const BogusImplicitConversion &) {}

Early C++11 compilers had a bug where braces would prefer aggregate initialization over copy constructors. A struct with an explicitly defaulted copy constructor is still considered an aggregate. (Here, the aggregate initializer takes 0 arguments, so that's why it's complaining about 'too many arguments'.)

@wjakob
Copy link
Member Author

wjakob commented Aug 28, 2017

Thank you for the suggestion

@wjakob wjakob merged commit 8ed5b8a into pybind:master Aug 28, 2017
wjakob added a commit that referenced this pull request Aug 28, 2017
@dean0x7d dean0x7d modified the milestone: v2.2 Aug 30, 2017
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.

2 participants