mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 15:10:46 +03:00
Explicitly type RegexMatch.front (and add inout because captures has
inout as well). Fixes issue 18124
This commit is contained in:
parent
593ac6218b
commit
fdc3e994cd
1 changed files with 2 additions and 2 deletions
|
@ -764,7 +764,7 @@ public:
|
||||||
assert(m.empty);
|
assert(m.empty);
|
||||||
---
|
---
|
||||||
+/
|
+/
|
||||||
@property auto front()
|
@property inout(Captures!R) front() inout
|
||||||
{
|
{
|
||||||
return _captures;
|
return _captures;
|
||||||
}
|
}
|
||||||
|
@ -799,7 +799,7 @@ public:
|
||||||
T opCast(T:bool)(){ return !empty; }
|
T opCast(T:bool)(){ return !empty; }
|
||||||
|
|
||||||
/// Same as .front, provided for compatibility with original std.regex.
|
/// 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)
|
private @trusted auto matchOnce(RegEx, R)(R input, const RegEx prog)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue