Bug 19366 – Qualify opCast(bool) as const for findSplit, findSplitBefore and findSplitAfter

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-11-05T15:48:21Z
Last change time
2018-11-05T19:15:17Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-11-05T15:48:21Z
Qualify opCast(bool) as const for findSplit, findSplitBefore and findSplitAfter. Enables usage --- if (const split = "a b".findSplit(" ")) {} --- as a const variant to --- if (auto split = "a b".findSplit(" ")) {} --- See also: https://forum.dlang.org/post/[email protected]. Pull request: https://github.com/dlang/phobos/pull/6749
Comment #1 by github-bugzilla — 2018-11-05T19:15:16Z
Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/6b64ed9d5772e0d64281659fb2c9e034703926a4 Fix Issue 19366 - Qualify opCast(bool) as const for findSplit, findSplitBefore and findSplitAfter.