Bug 16671 – std.variant visiting functions should pass file, line to VariantException
Status
RESOLVED
Resolution
WONTFIX
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-11-08T12:04:00Z
Last change time
2017-01-05T16:48:46Z
Keywords
pull
Assigned to
nobody
Creator
nick
Comments
Comment #0 by nick — 2016-11-08T12:04:12Z
When Algebraic().visit (or tryVisit) throws an exception, the file and line number are always internal to std.variant. It should use the caller's __FILE__, __LINE__.
Comment #1 by greeenify — 2016-12-27T10:49:04Z
The PR (https://github.com/dlang/phobos/pull/4892) was closed due to its increase in overhead:
> No, sorry, this is too much overhead. One major attraction of visitiation it doesn't have a large performance hit, and this chews into that.
It was suggested to rework the PR to avoid affecting the release output.