-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
P0935R0 Eradicating Unnecessarily Explicit Default Constructors #41
Comments
This sounds like a good next issue I can tackle. |
I wonder whether we should implement this unconditionally. Implementers have long-standing permission from the Standard to implement member functions (including constructors) with different signatures than depicted, as long as the behavior is the same. Splitting up default arguments into separate overloads is an allowed transformation. Unconditional implementation would be unlikely to disrupt 14/17 code, since making a default constructor implicit has basically no effect for someone who didn’t need it. The downside would be portability - users might take advantage of it, and then have problems porting to other STLs. So perhaps the best thing to do would be to unconditionally split signatures, but then mark the default constructor with an @BillyONeal, @CaseyCarter, @barcharcraz - thoughts? |
Mild preference for |
Mild preference to treat it as a DR. (And admonish lib(std)?c++ to do the same) |
I've emailed some libc++ and libstdc++ maintainers about implementing this unconditionally. |
libstdc++ has implemented this unconditionally, so we should do the same thing - no macros or preprocessor logic. (We have an "implemented unconditionally" section in |
@StephanTLavavej thanks for following up with the other library vendors! An unconditional implementation it is! |
P0935R0 Eradicating Unnecessarily Explicit Default Constructors
The text was updated successfully, but these errors were encountered: