Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This version of Boost is under active development. You are currently in the develop branch. The current version is 1.89.0.
For the major operations addition, subtraction, intersection
of icl containers and for symmetric
difference inplace operators
+= |=,
-=, &=
and ^= are provided.
For every inplace operator
T& operator o= (T& object, const P& operand)
the icl provides corresponding infix operators.
T operator o (T object, const P& operand){ return object o= operand; } T operator o (const P& operand, T object){ return object o= operand; }
From this implementation of the infix operator
o the compiler will hopefully use
return value optimization (RVO)
creating no temporary object and performing one copy of the first argument
object.
![]() |
Caution |
|---|---|
Compared to the inplace |
Use infix operators only, if
o= as a copy anyway.
operators o
The time complexity of all infix operators of the icl
is biased by the extra copy of the object
argument. So all infix operators
o are at least linear
in n =
object.iterative_size().
Taking this into account, the complexities of all infix operators can be
determined from the corresponding inplace operators
o=
they depend on.