Opened 8 years ago
Closed 13 months ago
#10845 closed Feature Requests (duplicate)
Generic comparison operators
Reported by: | Antony Polukhin | Owned by: | Antony Polukhin |
---|---|---|---|
Milestone: | To Be Determined | Component: | variant |
Version: | Boost 1.57.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
It could be useful to have comparison operators with types that are held in variant. For example:
variant<int, string> v1(1), v2("2"); if (v1 < 1 || v2 > "hello") { // ... } if (v1 < 1.0) { // compilation error // ... }
Note:
See TracTickets
for help on using tickets.
Moved the issue to github https://github.com/boostorg/variant/issues/95