Bug 9043 – std.variant: Crash on comparing unordered types
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-17T15:55:00Z
Last change time
2012-11-17T17:03:55Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2012-11-17T15:55:24Z
Handling comparisons of unordered types in std.variant is broken:
---
import std.variant;
struct A { int a; }
auto b = Variant(A(3)) == A(4); // segfaults
auto c = Variant(A(3)) < A(4); // segfaults instead of throwing
---
Fix incoming.
Comment #1 by github-bugzilla — 2012-11-17T17:02:16Z