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

Avoid -Wzero-as-null-pointer-constant warning in string_view ctor #183

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

Flamefire
Copy link
Contributor

This is an issue for C++11 and up for e.g. Boost libs that want to ensure warning-free build.

Solution is simply to move the SFINAE expression to the template argument list to avoid the <..>* = 0 default argument

Alternative: enable_if<..., int>::type = 0

@pdimov pdimov merged commit 3e147e4 into boostorg:develop Jan 5, 2025
73 checks passed
@Flamefire Flamefire deleted the warning branch January 5, 2025 16:42
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