Opened 9 years ago
Closed 8 years ago
#8620 closed Feature Requests (fixed)
Boost.Variant has no inequality operator
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.58.0 | Component: | variant |
Version: | Boost 1.52.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
The Boost.Variant does not support inequality, e.g.
typedef boost::variant<int> Variant;
Variant var1; Variant var2;
if (!(var1 == var2)) { }
It would ofc be nicer if
if (var1 != var2) { }
Boost.operators already solve this problem (by deriving from equality_comparable or even better totally_ordered); not sure if this would help. The downside is that Boost.Variant is already a compile time cpu hog; with Boost.Operators it may be even worse.
Change History (2)
comment:1 by , 8 years ago
Milestone: | To Be Determined → Boost 1.58.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Added missing operators to the develop branch.