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

Added const_default function #4

Merged
merged 3 commits into from
Oct 16, 2021
Merged

Added const_default function #4

merged 3 commits into from
Oct 16, 2021

Conversation

Eolu
Copy link
Contributor

@Eolu Eolu commented Oct 5, 2021

Proposing this addition because sometimes the function-syntax is more ergonomic

@AerialX AerialX merged commit d0ffb5c into AerialX:master Oct 16, 2021
AerialX pushed a commit that referenced this pull request Oct 16, 2021
Co-authored-by: Griffin O'Neill <gsoneill1003@gmail.com>
@AerialX
Copy link
Owner

AerialX commented Oct 16, 2021

Unfortunately this has to be restricted to unstable right now (7c38c5c), but I buy it being better than <X as ConstDefault>::DEFAULT in some situations so sure, why not.

@yvt
Copy link

yvt commented Dec 19, 2021

There's a way to make this available in a stable compiler (yvt@eb449e7). I can send a PR if you are okay with this technique.

@AerialX
Copy link
Owner

AerialX commented Dec 19, 2021

Interesting workaround! That it's tracked as an upstream bug (and could possibly be fixed in the future) makes me wary of including it by default though, so I'm not entirely sure whether to go ahead with including that or not... Though hiding it behind another feature like unstable-fn or something seems overkill for something that's just a cosmetic feature, so hm... I'm not really sure.

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

3 participants