Explicitly type RegexMatch.front (and add inout because captures has

inout as well). Fixes issue 18124
This commit is contained in:
Steven Schveighoffer 2017-12-31 09:24:47 -05:00
parent 593ac6218b
commit fdc3e994cd

View file

@ -764,7 +764,7 @@ public:
assert(m.empty);
---
+/
@property auto front()
@property inout(Captures!R) front() inout
{
return _captures;
}
@ -799,7 +799,7 @@ public:
T opCast(T:bool)(){ return !empty; }
/// Same as .front, provided for compatibility with original std.regex.
@property auto captures() inout { return _captures; }
@property inout(Captures!R) captures() inout { return _captures; }
}
private @trusted auto matchOnce(RegEx, R)(R input, const RegEx prog)