We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7ac83c commit d14fe6cCopy full SHA for d14fe6c
spec/function.dd
@@ -651,15 +651,13 @@ $(H2 $(LNAME2 inout-functions, Inout Functions))
651
into one function using the $(D inout) type constructor. Consider the following
652
overload set:
653
)
654
- $(SPEC_RUNNABLE_EXAMPLE_COMPILE
655
---
656
int[] slice(int[] a, int x, int y) { return a[x .. y]; }
657
658
const(int)[] slice(const(int)[] a, int x, int y) { return a[x .. y]; }
659
660
immutable(int)[] slice(immutable(int)[] a, int x, int y) { return a[x .. y]; }
661
662
- )
663
664
$(P The code generated by each of these functions is identical.
665
The $(D_KEYWORD inout) type constructor can combine them into one function:)
0 commit comments