...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
namespace boost { namespace bimaps { template< class KeyType > struct unconstrained_set_of; struct unconstrained_set_of_relation; } // namespace bimap } // namespace boost
An unconstrained_set_of set view is a view with no constraints. The use of these kind of view boost the bimap performance but the view can not be accessed. An unconstrained view is an empty class.
namespace boost { namespace bimaps { namespace views { template< -implementation defined parameter list- > class -implementation defined view name- { // Empty view }; } // namespace views } // namespace bimap } // namespace boost
In the case of a bimap< unconstrained_set_of<Left>, ... >
In the set view:
typedef signature-compatible with relation< Left, ... > key_type; typedef signature-compatible with relation< Left, ... > value_type;
In the left map view:
typedef Left key_type; typedef ... mapped_type; typedef signature-compatible with std::pair< Left, ... > value_type;
In the right map view:
typedef ... key_type; typedef Left mapped_type; typedef signature-compatible with std::pair< ... , Left > value_type;
We adopt the scheme outlined in the complexity
signature section. An unconstrained view can not be accessed by
the user, but the formulas to find the order of an operation for a bimap
hold with the following definitions. The complexity signature of a unconstrained_set_of
view is:
c(n) = 0
i(n) = 0
h(n) = 0
d(n) = 0
r(n) = 0
m(n) = 0
Views cannot be serialized on their own, but only as part of the bimap
into which they are embedded.
In describing the additional preconditions and guarantees associated
to list_of
views with
respect to serialization of their embedding containers, we use the concepts
defined in the bimap
serialization section.
Operation: saving of a bimap
b to an output archive (XML archive)
ar.
Operation: loading of a bimap
b' from an input archive (XML
archive) ar.