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

The SFINAE (char(*)[N])(nullptr) trick out of -pedantic #34

Open
irrequietus opened this issue Sep 19, 2016 · 0 comments
Open

The SFINAE (char(*)[N])(nullptr) trick out of -pedantic #34

irrequietus opened this issue Sep 19, 2016 · 0 comments

Comments

@irrequietus
Copy link
Owner

Something like (char(*)[N])(nullptr) cannot exist under specific conditions that are of implicit conversion to positive integers / zero when used with such an array type; this is a technique that I often use for sfinae but non-compliant compilers might want to enable zero sized arrays (a GNU extension) by default. Thus, _compilers not respecting this, are not compliant to the standard_ and one of the reasons why -pedantic is on by default on clause. Making a note of this for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant