Skip to content

Conversation

@Geod24
Copy link
Contributor

@Geod24 Geod24 commented Sep 1, 2020

When the switch is provided, '[auto] ref in' becomes illegal in the parser. This little trick, using static if + mixin, allow to have a different function based on whether the switch is used or not. 

If I could get a point release, that would allow me to make progress with dlang/dmd#11632

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2020

Codecov Report

Merging #318 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #318 +/- ## ======================================= Coverage 92.39% 92.39% ======================================= Files 59 59 Lines 13064 13064 ======================================= Hits 12071 12071 Misses 993 993 
Impacted Files Coverage Δ
source/mir/ndslice/internal.d 72.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99977c0...c39ae9a. Read the comment docs.

@9il
Copy link
Member

9il commented Sep 1, 2020

Thank you for the PR. Could you please describe why auto ref in can't be replaced with auto ref scope const?

@Geod24
Copy link
Contributor Author

Geod24 commented Sep 1, 2020

It can. I just figured you actually wanted to use in as it was intended here, so I went the extra way to make it work.
But I can just revert it and simply remove in in favor of scope const.

@9il
Copy link
Member

9il commented Sep 1, 2020

But I can just revert it and simply remove in in favor of scope const.

Yes, please do so. It is preferable

When the switch is provided, '[auto] ref in' becomes illegal in the parser, so instead just use const scope.
@Geod24
Copy link
Contributor Author

Geod24 commented Sep 1, 2020

Updated

@9il 9il merged commit 66f0078 into libmir:master Sep 1, 2020
@Geod24 Geod24 deleted the preview-in branch September 1, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants