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
Add default constructor for Reverse{Fwd}() #37822
base: master
Are you sure you want to change the base?
Conversation
I'm having a hard time picturing a use case for this. |
It's been two years and I struggle to even remember the PR. because just like for the |
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.
Seems sensible; I wonder if we should support this for all singleton types
This PR is ever-so-slightly stronger than supporting T()
for all singleton types T
because it also supports ReverseOrdering{T}
for all types T
with T()
defined, so it would be technically breaking to revert this should #47853 be accepted.
Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com>
Follow up to #33736
if you have a RevereOrdering type and it has its type parameter.
Then most often it is the standard
typeof(Base.Reverse)
which isReverseOrdering{ForwardOrdering}
which can be constructed as
ReverseOrdering(ForwardOrdering()) == Reverse