Opened 9 years ago

Closed 8 years ago

#8620 closed Feature Requests (fixed)

Boost.Variant has no inequality operator

Reported by: gast128@… 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 Antony Polukhin, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0
Owner: changed from ebf to Antony Polukhin
Status: newassigned

Added missing operators to the develop branch.

comment:2 by Antony Polukhin, 8 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.