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
Allowing for non-default-constructible component types #2851
Conversation
@hkaiser |
naming::gid_type create(std::size_t count, std::false_type) | ||
{ | ||
// shouldn't ever be called for non-default-constructible types | ||
HPX_ASSERT(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to resort to a runtime error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you suggest? A static assert would trigger for any non-default constructible type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if we call new_ without arguments, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, always - this function is called by create(size_t)
which is a virtual function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right, too bad :/
naming::gid_type create(std::size_t count, std::false_type) | ||
{ | ||
// shouldn't ever be called for non-default-constructible types | ||
HPX_ASSERT(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@krivenko: please verify this solves the problem you reported the other day,