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

Assert that layout construction from extents is valid where used #5209

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

crtrott
Copy link
Member

@crtrott crtrott commented Jul 12, 2022

Also introduces a missing layout overload for required_allocation_size

@crtrott
Copy link
Member Author

crtrott commented Jul 12, 2022

Fixes #5205

check_input_args::yes) {
static_assert(traits::array_layout::is_extent_constructible,
"Layout is not extent constructible. Use overload taking a "
"layout object instead.\n");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"layout object instead.\n");
"layout object instead.");

same comment everywhere

check_input_args::yes) {}
check_input_args::yes) {
static_assert(traits::array_layout::is_extent_constructible,
"Layout is not extent constructible. Use overload taking a "
Copy link
Member

Choose a reason for hiding this comment

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

Please suggest a message that will be easier to understand for users

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know, seems pretty obvious to me?

Copy link
Member

Choose a reason for hiding this comment

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

"is not constructible from extent arguments. Use ..."

Copy link
Contributor

Choose a reason for hiding this comment

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

I would just use the second sentence "Use the overload taking a layout object instead!".

Copy link
Member Author

Choose a reason for hiding this comment

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

applied

@ajpowelsnl ajpowelsnl added Blocks Promotion Overview issue for release-blocking bugs and removed Blocks Promotion Overview issue for release-blocking bugs labels Jul 13, 2022
Also introduces a missing layout overload for required_allocation_size
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

6 participants