Opened 8 years ago

#10513 new Patches

Use operator | and |= for set addition if | and |= are called

Reported by: clan@… Owned by: Joachim Faulhaber
Milestone: To Be Determined Component: ICL
Version: Boost 1.55.0 Severity: Optimization
Keywords: Cc:

Description

As mentioned in the document (http://www.boost.org/doc/libs/1_56_0/libs/icl/doc/html/boost_icl/function_reference/addition.html), a set union semantics is often attached operators |= and |. This is the case, for example, when using boost::dynamic_bitset, which does not provide operators += and + for set union semantics.

However, the original implementation of operators |= and | still uses += and + for the underlying set container. This makes operators |= and | less useful. Furthermore, we can't use boost::dynamic_bitset for icl objects currently. I think this is an unnecessary limitation.

To make the code more consistent with the statement above, a proper fix would be changing += and + into |= and | when users call the |= and | operators.

The patch is on: https://github.com/boostorg/icl/pull/4

Change History (0)

Note: See TracTickets for help on using tickets.