Skip to content

Commit

Permalink
fix broken Jenkins CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryOlshansky committed Sep 28, 2017
1 parent c49ea4f commit 7bf26af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion std/regex/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ template ctRegexImpl(alias pattern, string flags=[])
static immutable staticRe = cast(immutable) r.withFactory(new CtfeFactory!(CtMatcher, Char, func));
struct Wrapper
{
@property ref getRe() const { return staticRe; }
// allow code that expects mutable Regex to still work
// we stay "logically const"
@trusted @property auto getRe() const { return cast() staticRe; }
alias getRe this;
}
enum wrapper = Wrapper();
Expand Down

0 comments on commit 7bf26af

Please sign in to comment.