diff --git a/doc/html/boost_bimap/acknowledgements.html b/doc/html/boost_bimap/acknowledgements.html index df2b8b0..f7b86be 100644 --- a/doc/html/boost_bimap/acknowledgements.html +++ b/doc/html/boost_bimap/acknowledgements.html @@ -3,8 +3,8 @@ Acknowledgements - - + + @@ -13,15 +13,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
PrevUpHome
-
+
@@ -71,7 +71,7 @@ a lot to Ion Gaztañaga for managing the review.

- + Boost.Bimap Team

diff --git a/doc/html/boost_bimap/bimap_and_boost.html b/doc/html/boost_bimap/bimap_and_boost.html index a894a17..98b3570 100644 --- a/doc/html/boost_bimap/bimap_and_boost.html +++ b/doc/html/boost_bimap/bimap_and_boost.html @@ -3,8 +3,8 @@ Bimap and Boost - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


PrevUpHomeNext
-
+
@@ -45,7 +45,7 @@
Dependencies
-
+

Bimap and MultiIndex @@ -101,7 +101,7 @@ in its own class every time they want to use it as a bidirectional map. Boost.Bimap takes advantage of the narrower scope to produce a better interface for bidirectional maps - [2] + [2] . There is no learning curve if you know how to use standard containers. Great effort was put into mapping the naming scheme of the STL to Boost.Bimap. The library is designed to match the common STL containers. @@ -151,7 +151,7 @@



-

[2] +

[2] In the same fashion, Boost.MRU will allow the creation of most recent updated aware containers, hiding the complexity of Boost.MultiIndex. diff --git a/doc/html/boost_bimap/bimap_and_boost/boost_libraries_that_work_well_with_boost_bimap.html b/doc/html/boost_bimap/bimap_and_boost/boost_libraries_that_work_well_with_boost_bimap.html index e238c74..f34785b 100644 --- a/doc/html/boost_bimap/bimap_and_boost/boost_libraries_that_work_well_with_boost_bimap.html +++ b/doc/html/boost_bimap/bimap_and_boost/boost_libraries_that_work_well_with_boost_bimap.html @@ -3,8 +3,8 @@ Boost Libraries that work well with Boost.Bimap - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


PrevUpHomeNext
-
+
-
+
@@ -280,7 +280,7 @@
-
+
@@ -298,8 +298,7 @@

-
-typedef bimap< std::string, int > bm_type;
+
typedef bimap< std::string, int > bm_type;
 
 // Create a bimap and serialize it to a file
 {
@@ -310,9 +309,9 @@
     std::ofstream ofs("data");
     boost::archive::text_oarchive oa(ofs);
 
-    oa << const_cast<const bm_type&>(bm); 1
+    oa << const_cast<const bm_type&>(bm); 1
 
-    2const bm_type::left_iterator left_iter = bm.left.find("two");
+    2const bm_type::left_iterator left_iter = bm.left.find("two");
     oa << left_iter;
 
     const bm_type::right_iterator right_iter = bm.right.find(1);
@@ -349,14 +348,14 @@
             

- + - + @@ -376,7 +375,7 @@ in build times, and may be necessary in those defective compilers that fail to correctly process Boost.Serialization headers.

-

1

1

We must do a const cast because Boost.Serialization archives only save const objects. Read Boost.Serializartion docs for the rationale behind this decision

2

2

We can only serialize iterators if the bimap was serialized first. Note that the const cast is not requiered here because we create our iterators as const.

+
@@ -404,7 +403,7 @@ must be done only after serializing its corresponding container.

-
+
@@ -434,12 +433,11 @@

-
- typedef bimap< multiset_of< int >, list_of< std::string > > bm_type;
+
 typedef bimap< multiset_of< int >, list_of< std::string > > bm_type;
 
  // We can use assign::list_of to initialize the container.
 
- bm_type bm = assign::list_of< bm_type::relation > 1
+ bm_type bm = assign::list_of< bm_type::relation > 1
      ( 1, "one"   )
      ( 2, "two"   )
      ( 3, "three" );
@@ -476,7 +474,7 @@
 

[Warning] Warning
- + - - + +

1

1

Note that bm_type::relation has to be used instead of bm_type::value_type. Contrary to value_type, relation @@ -487,7 +485,7 @@

-
+
@@ -508,12 +506,12 @@ results.

- Boost.Hash can be extended + Boost.Hash can be extended for custom data types, enabling to use the default parameter of the unordered set types with any user types.

-
+
@@ -539,8 +537,7 @@

-
-typedef bimap< std::string, int > bm_type;
+
typedef bimap< std::string, int > bm_type;
 
 bm_type bm;
 bm.insert( bm_type::value_type("one",1) );
@@ -557,7 +554,7 @@
 

-
+
@@ -585,8 +582,7 @@

-
-template< class ForwardReadableRange, class UnaryFunctor >
+
template< class ForwardReadableRange, class UnaryFunctor >
 UnaryFunctor for_each(const ForwardReadableRange & r, UnaryFunctor func)
 {
     typedef typename 
@@ -630,8 +626,7 @@
 

-
-struct pair_printer
+
struct pair_printer
 {
     pair_printer(std::ostream & o) : os(o) {}
     template< class Pair >
@@ -688,7 +683,7 @@
           Go to source code
         

-
+
@@ -712,8 +707,7 @@

-
-typedef bimap< std::string, list_of<int> > bm_type;
+
typedef bimap< std::string, list_of<int> > bm_type;
 
 bm_type bm;
 bm.insert( bm_type::value_type("1", 1) );
@@ -723,7 +717,7 @@
 
 BOOST_FOREACH( bm_type::left_reference p, bm.left )
 {
-    ++p.second; 1
+    ++p.second; 1
 }
 
 BOOST_FOREACH( bm_type::right_const_reference p, bm.right )
@@ -739,7 +733,7 @@
 

- +

1

1

We can modify the right element because we have use a mutable collection type in the right side.

@@ -755,8 +749,7 @@

-
-BOOST_FOREACH( bm_type::left_reference p,
+
BOOST_FOREACH( bm_type::left_reference p,
              ( bm.left.range( std::string("1") <= _key, _key < std::string("3") ) ))
 {
     ++p.second;
@@ -776,21 +769,19 @@
           Go to source code
         

-
+

Once C++0x is out we are going to be able to write code like:

-
-auto iter = bm.by<name>().find("john");
+
auto iter = bm.by<name>().find("john");
 

instead of the more verbose

-
-bm_type::map_by<name>::iterator iter = bm.by<name>().find("john");
+
bm_type::map_by<name>::iterator iter = bm.by<name>().find("john");
 

Boost.Typeof defines a macro BOOST_AUTO that can be used as a library solution @@ -804,8 +795,7 @@

-
-typedef bimap< tagged<std::string,name>, tagged<int,number> > bm_type;
+
typedef bimap< tagged<std::string,name>, tagged<int,number> > bm_type;
 bm_type bm;
 bm.insert( bm_type::value_type("one"  ,1) );
 bm.insert( bm_type::value_type("two"  ,2) );
@@ -822,8 +812,7 @@
 

-
-for( bm_type::map_by<name>::iterator iter = bm.by<name>().begin();
+
for( bm_type::map_by<name>::iterator iter = bm.by<name>().begin();
      iter!=bm.by<name>().end(); ++iter)
 {
     std::cout << iter->first << " --> " << iter->second << std::endl;
@@ -844,8 +833,7 @@
 

-
-for( BOOST_AUTO(iter, bm.by<name>().begin()); iter!=bm.by<name>().end(); ++iter)
+
for( BOOST_AUTO(iter, bm.by<name>().begin()); iter!=bm.by<name>().end(); ++iter)
 {
     std::cout << iter->first << " --> " << iter->second << std::endl;
 }
@@ -861,7 +849,7 @@
           Go to source code
         

-
+
@@ -875,8 +863,7 @@

-
-typedef bimap< std::string, int > bm_type;
+
typedef bimap< std::string, int > bm_type;
 bm_type bm;
 
 std::string rel_str("one <--> 1     two <--> 2      three <--> 3");
@@ -900,7 +887,7 @@
           Go to source code
         

-
+
@@ -928,8 +915,7 @@ are read-write property maps. In order to use these, you need to include one of the following headers:

-
-#include <boost/bimap/property_map/set_support.hpp>
+
#include <boost/bimap/property_map/set_support.hpp>
 #include <boost/bimap/property_map/unordered_set_support.hpp>
 

@@ -944,8 +930,7 @@

-
-template <typename AddressMap>
+
template <typename AddressMap>
 void foo(AddressMap & address_map)
 {
     typedef typename boost::property_traits<AddressMap>::value_type value_type;
diff --git a/doc/html/boost_bimap/bimap_and_boost/dependencies.html b/doc/html/boost_bimap/bimap_and_boost/dependencies.html
index 9997604..d27c96a 100644
--- a/doc/html/boost_bimap/bimap_and_boost/dependencies.html
+++ b/doc/html/boost_bimap/bimap_and_boost/dependencies.html
@@ -3,8 +3,8 @@
 
 Dependencies
 
-
-
+
+
 
 
 
@@ -14,15 +14,15 @@
 
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

PrevUpHomeNext
-
+
@@ -35,7 +35,7 @@ is the heart of this library.

-

Table 1.4. Boost Libraries needed by Boost.Bimap

+

Table 1.4. Boost Libraries needed by Boost.Bimap

@@ -184,7 +184,7 @@

-

Table 1.5. Optional Boost Libraries

+

Table 1.5. Optional Boost Libraries

@@ -354,7 +354,7 @@

-

Table 1.6. Additional Boost Libraries needed to run +

Table 1.6. Additional Boost Libraries needed to run the test-suite

diff --git a/doc/html/boost_bimap/compiler_specifics.html b/doc/html/boost_bimap/compiler_specifics.html index 9bcce77..9028932 100644 --- a/doc/html/boost_bimap/compiler_specifics.html +++ b/doc/html/boost_bimap/compiler_specifics.html @@ -3,8 +3,8 @@ Compiler specifics - - + + @@ -14,15 +14,15 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

PrevUpHomeNext
-
+
@@ -325,7 +325,7 @@

- + VS 7.1

@@ -334,7 +334,7 @@ in msdn is to split the .cpp in several files or upgrade your compiler.

- + VS 8.0

@@ -346,8 +346,7 @@ In order to turn off the warnings add the followings defines at the begging of your .cpp files:

-
-#define _CRT_SECURE_NO_DEPRECATE
+
#define _CRT_SECURE_NO_DEPRECATE
 #define _SCL_SECURE_NO_DEPRECATE
 
diff --git a/doc/html/boost_bimap/examples.html b/doc/html/boost_bimap/examples.html index c22bd1f..a202f47 100644 --- a/doc/html/boost_bimap/examples.html +++ b/doc/html/boost_bimap/examples.html @@ -3,8 +3,8 @@ Examples - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
PrevUpHomeNext
-
+ -
+
@@ -44,7 +44,7 @@ find all the examples used in bimap documentation. Here is a list of them:

-

Table 1.7. Tutorial examples

+

Table 1.7. Tutorial examples

@@ -238,7 +238,7 @@

-

Table 1.8. Bimap and Boost examples

+

Table 1.8. Bimap and Boost examples

@@ -361,7 +361,7 @@

-

Table 1.9. Boost.MultiIndex to Boost.Bimap path examples

+

Table 1.9. Boost.MultiIndex to Boost.Bimap path examples

diff --git a/doc/html/boost_bimap/examples/mighty_bimap.html b/doc/html/boost_bimap/examples/mighty_bimap.html index b851364..0226d7d 100644 --- a/doc/html/boost_bimap/examples/mighty_bimap.html +++ b/doc/html/boost_bimap/examples/mighty_bimap.html @@ -3,8 +3,8 @@ Mighty Bimap - - + + @@ -14,15 +14,15 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

PrevUpHomeNext
-
+
@@ -38,8 +38,7 @@

-
-#include <iostream>
+
#include <iostream>
 #include <string>
 #include <boost/bimap/bimap.hpp>
 #include <boost/bimap/list_of.hpp>
diff --git a/doc/html/boost_bimap/examples/multiindex_to_bimap_path___bidirectional_map.html b/doc/html/boost_bimap/examples/multiindex_to_bimap_path___bidirectional_map.html
index 619e8d2..5d0efe9 100644
--- a/doc/html/boost_bimap/examples/multiindex_to_bimap_path___bidirectional_map.html
+++ b/doc/html/boost_bimap/examples/multiindex_to_bimap_path___bidirectional_map.html
@@ -3,8 +3,8 @@
 
 MultiIndex to Bimap Path - Bidirectional Map
 
-
-
+
+
 
 
 
@@ -14,15 +14,15 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
PrevUpHomeNext
-
+
- + Boost.MultiIndex

@@ -54,8 +54,7 @@

-
-#include <iostream>
+
#include <iostream>
 #include <boost/tokenizer.hpp>
 
 #include <boost/multi_index_container.hpp>
@@ -151,7 +150,7 @@
 

- + Boost.Bimap

@@ -163,8 +162,7 @@

-
-#include <iostream>
+
#include <iostream>
 #include <boost/tokenizer.hpp>
 #include <boost/bimap/bimap.hpp>
 
@@ -200,7 +198,7 @@
         // the second part of the element is the equivalent in English
 
         std::cout << word << " is said "
-                  << it->second 1
+                  << it->second 1
                   << " in English" << std::endl;
     }
     else
@@ -211,7 +209,7 @@
         if( it2 != d.right.end() )
         {
             std::cout << word << " is said "
-                      << it2->second 2
+                      << it2->second 2
                       << " in Spanish" << std::endl;
         }
         else
@@ -231,13 +229,13 @@
           

- + - + @@ -259,8 +257,7 @@

-
-#include <iostream>
+
#include <iostream>
 
 #include <boost/bimap/bimap.hpp>
 
diff --git a/doc/html/boost_bimap/examples/multiindex_to_bimap_path___hashed_indices.html b/doc/html/boost_bimap/examples/multiindex_to_bimap_path___hashed_indices.html
index a3daee5..fc150a8 100644
--- a/doc/html/boost_bimap/examples/multiindex_to_bimap_path___hashed_indices.html
+++ b/doc/html/boost_bimap/examples/multiindex_to_bimap_path___hashed_indices.html
@@ -3,8 +3,8 @@
 
 MultiIndex to Bimap Path - Hashed indices
 
-
-
+
+
 
 
 
@@ -14,15 +14,15 @@
 
- - + +

1

1

it is an iterator of the left view, so it->second refers to the right element of the relation, the word in english

2

2

it2 is an iterator of the right view, so it2->second refers to the left element of the relation, the word in spanish

Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

PrevUpHomeNext
-
+
- + Boost.MultiIndex

@@ -52,8 +52,7 @@

-
-#include <iostream>
+
#include <iostream>
 #include <iomanip>
 
 #include <boost/tokenizer.hpp>
@@ -141,7 +140,7 @@
 

- + Boost.Bimap

@@ -152,8 +151,7 @@

-
-#include <iostream>
+
#include <iostream>
 #include <iomanip>
 
 #include <boost/tokenizer.hpp>
diff --git a/doc/html/boost_bimap/examples/simple_bimap.html b/doc/html/boost_bimap/examples/simple_bimap.html
index d107ba6..b143f1e 100644
--- a/doc/html/boost_bimap/examples/simple_bimap.html
+++ b/doc/html/boost_bimap/examples/simple_bimap.html
@@ -3,8 +3,8 @@
 
 Simple Bimap
 
-
-
+
+
 
 
 
@@ -14,15 +14,15 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
PrevUpHomeNext
-
+
@@ -37,8 +37,7 @@

-
-#include <string>
+
#include <string>
 #include <iostream>
 
 #include <boost/bimap.hpp>
@@ -110,8 +109,7 @@
 

-
-#include <iostream>
+
#include <iostream>
 
 #include <boost/bimap.hpp>
 
@@ -142,12 +140,12 @@
     std::cout << "Countries names ordered by their final position:"
                 << std::endl;
 
-    1for( results_bimap::map_by<place>::const_iterator
+    1for( results_bimap::map_by<place>::const_iterator
             i    = results.by<place>().begin(),
             iend = results.by<place>().end() ;
             i != iend; ++i )
     {
-        2std::cout << i->get<place  >() << ") "
+        2std::cout << i->get<place  >() << ") "
                   << i->get<country>() << std::endl;
     }
 
@@ -156,7 +154,7 @@
                  "their final position:"
               << std::endl;
 
-    3for( results_bimap::map_by<country>::const_iterator
+    3for( results_bimap::map_by<country>::const_iterator
             i    = results.by<country>().begin(),
             iend = results.by<country>().end() ;
             i != iend; ++i )
@@ -177,18 +175,18 @@
           

- + - + - + diff --git a/doc/html/boost_bimap/future_work.html b/doc/html/boost_bimap/future_work.html index 8547b64..5d80742 100644 --- a/doc/html/boost_bimap/future_work.html +++ b/doc/html/boost_bimap/future_work.html @@ -3,8 +3,8 @@ Future work - - + + @@ -14,20 +14,20 @@ - - + +

1

1

results.by<place>() is equivalent to results.right

2

2

get<Tag> works for each view of the bimap

3

3

results.by<country>() is equivalent to results.left

Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

PrevUpHomeNext
-
+

- + Rearrange Function

diff --git a/doc/html/boost_bimap/history.html b/doc/html/boost_bimap/history.html index a13e3f4..beb5b3c 100644 --- a/doc/html/boost_bimap/history.html +++ b/doc/html/boost_bimap/history.html @@ -3,8 +3,8 @@ History - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


PrevUpHomeNext
-
+
@@ -32,7 +32,7 @@
MultiIndex and Bimap
-
+

The long path from Code Project to Boost diff --git a/doc/html/boost_bimap/history/multiindex_and_bimap.html b/doc/html/boost_bimap/history/multiindex_and_bimap.html index 6c92c91..2f7745d 100644 --- a/doc/html/boost_bimap/history/multiindex_and_bimap.html +++ b/doc/html/boost_bimap/history/multiindex_and_bimap.html @@ -3,8 +3,8 @@ MultiIndex and Bimap - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
PrevUpHomeNext
-
+

MultiIndex and Bimap @@ -95,8 +95,7 @@

-
-// Data structure itself
+
// Data structure itself
 template<typename ValueType,typename KeyType>
 struct Node;
 template<typename ValueType,typename KeyType>
@@ -141,8 +140,7 @@
 

-
-ptree_gen<string,string>::type PT;
+
ptree_gen<string,string>::type PT;
 boost::archive::text_iarchive ia( std::ifstream ifs("filename") );
 ia >> PT;
 string value = get( "a.b.c.d", PT );
diff --git a/doc/html/boost_bimap/introduction.html b/doc/html/boost_bimap/introduction.html
index c0bba66..a7001b0 100644
--- a/doc/html/boost_bimap/introduction.html
+++ b/doc/html/boost_bimap/introduction.html
@@ -3,8 +3,8 @@
 
 Introduction
 
-
-
+
+
 
 
 
@@ -14,20 +14,20 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
PrevUpHomeNext
-
+

- + How to use this document

@@ -73,7 +73,7 @@

-
+
@@ -88,7 +88,7 @@ and enjoy!

[Note] Note
-
+
@@ -102,72 +102,72 @@

[Important] Important

- + Navigation

Used in combination with the configured browser key (usually Alt), the following keys act as handy shortcuts for common navigation tasks.

-
    -
  • -General
      -
    • +
        +
      • +General
          +
        • p - Previous page
        • -
        • +
        • n - Next page
        • -
        • +
        • h - home
        • -
        • +
        • u - Up
      • -
      • -Main TOC
          -
        • +
        • +Main TOC
            +
          • i - Introduction
          • -
          • +
          • o - One minute tutorial
          • -
          • +
          • t - The tutorial
          • -
          • +
          • b - Bimap and Boost
          • -
          • +
          • r - Reference
          • -
          • +
          • c - Compiler specifics
          • -
          • +
          • v - Performance
          • -
          • +
          • e - Examples
          • -
          • +
          • s - Test Suite
          • -
          • +
          • f - Future work
          • -
          • +
          • m - Release notes
          • -
          • +
          • w - Rationale
          • -
          • +
          • y - History
          • -
          • +
          • a - Acknowledgements
          diff --git a/doc/html/boost_bimap/one_minute_tutorial.html b/doc/html/boost_bimap/one_minute_tutorial.html index 156c6a5..7dd4483 100644 --- a/doc/html/boost_bimap/one_minute_tutorial.html +++ b/doc/html/boost_bimap/one_minute_tutorial.html @@ -3,8 +3,8 @@ One minute tutorial - - + + @@ -14,20 +14,20 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
          PrevUpHomeNext
          -
          +

          - + What is a bimap?

          @@ -46,23 +46,22 @@

          The following code creates an empty bimap container:

          -
          -typedef bimap<X,Y> bm_type;
          +
          typedef bimap<X,Y> bm_type;
           bm_type bm;
           

          Given this code, the following is the complete description of the resulting bimap. - [1] + [1]

          -
            -
          • +
              +
            • bm.left is signature-compatible with std::map<X,Y>
            • -
            • +
            • bm.right is signature-compatible with std::map<Y,X>
            • -
            • +
            • bm is signature-compatible with std::set< relation<X,Y> >
            • @@ -77,8 +76,7 @@

              If we have any generic function that work with maps

              -
              -template< class MapType >
              +
              template< class MapType >
               void print_map(const MapType & m)
               {
                   typedef typename MapType::const_iterator const_iterator;
              @@ -92,8 +90,7 @@
                     We can use the left map view and the right map
                     view with it
                   

              -
              -bimap< int, std::string > bm;
              +
              bimap< int, std::string > bm;
               ...
               print_map( bm.left  );
               print_map( bm.right );
              @@ -109,7 +106,7 @@
               ...
               

              - + Layout of the relation and the pairs of a bimap

              @@ -123,14 +120,13 @@ relation.and.pair

              - + Step by step

              A convinience header is avaiable in the boost directory:

              -
              -#include <boost/bimap.hpp>
              +
              #include <boost/bimap.hpp>
               

              Lets define a bidirectional map between integers and strings: @@ -140,8 +136,7 @@

              -
              -typedef boost::bimap< int, std::string > bm_type;
              +
              typedef boost::bimap< int, std::string > bm_type;
               bm_type bm;
               

              @@ -149,7 +144,7 @@

              - + The collection of relations view

              @@ -163,8 +158,7 @@

              -
              -bm.insert( bm_type::value_type(1, "one" ) );
              +
              bm.insert( bm_type::value_type(1, "one" ) );
               bm.insert( bm_type::value_type(2, "two" ) );
               
               std::cout << "There are " << bm.size() << "relations" << std::endl;
              @@ -183,7 +177,7 @@
               

              - + The left map view

              @@ -198,8 +192,7 @@

              -
              -1typedef bm_type::left_map::const_iterator left_const_iterator;
              +
              1typedef bm_type::left_map::const_iterator left_const_iterator;
               
               for( left_const_iterator left_iter = bm.left.begin(), iend = bm.left.end();
                    left_iter != iend; ++left_iter )
              @@ -210,10 +203,10 @@
                   std::cout << left_iter->first << " --> " << left_iter->second << std::endl;
               }
               
              -2bm_type::left_const_iterator left_iter = bm.left.find(2);
              +2bm_type::left_const_iterator left_iter = bm.left.find(2);
               assert( left_iter->second ==  "two" );
               
              -3bm.left.insert( bm_type::left_value_type( 3, "three" ) );
              +3bm.left.insert( bm_type::left_value_type( 3, "three" ) );
               

              @@ -223,18 +216,18 @@

              - + - + - + @@ -244,7 +237,7 @@

              - + The right map view

              @@ -259,8 +252,7 @@

              -
              -bm_type::right_const_iterator right_iter = bm.right.find("two");
              +
              bm_type::right_const_iterator right_iter = bm.right.find("two");
               
               // right_iter->first  : key  : std::string
               // right_iter->second : data : int
              @@ -271,7 +263,7 @@
               
               bm.right.erase("two");
               
              -1bm.right.insert( bm_type::right_value_type( "four", 4 ) );
              +1bm.right.insert( bm_type::right_value_type( "four", 4 ) );
               

              @@ -280,7 +272,7 @@

              1

              1

              The type of bm.left is bm_type::left_map and the type of bm.right is bm_type::right_map

              2

              2

              bm_type::left_-type- can be used as a shortcut for the more verbose bm_type::left_map::-type-

              3

              3

              This line produces the same effect of bm.insert( bm_type::value_type(3,"three") );

              - +

              1

              1

              This line produces the same effect of bm.insert( bm_type::value_type(4,"four") );

              @@ -289,7 +281,7 @@

              - + Differences with std::map

              @@ -303,16 +295,14 @@ However dereferencing a bimap<X,Y>::left_iterator returns a type that is signature-compatible with a std::pair<const X, const Y>

              -
              -bm.left.find(1)->second = "1"; // Compilation error
              +
              bm.left.find(1)->second = "1"; // Compilation error
               

              If you insert (1,"one") and (1,"1") in a std::map<int,std::string> the second insertion will have no effect. In a bimap<X,Y> both keys have to remain unique. The insertion may fail in other situtions too. Lets see an example

              -
              -bm.clear();
              +
              bm.clear();
               
               bm.insert( bm_type::value_type( 1, "one" ) );
               
              @@ -322,7 +312,7 @@
               assert( bm.size() == 1 );
               

              - + A simple example

              @@ -337,8 +327,7 @@

              -
              -#include <string>
              +
              #include <string>
               #include <iostream>
               
               #include <boost/bimap.hpp>
              @@ -419,7 +408,7 @@
               Spain ends in position 2
               

              - + Continuing the journey

              @@ -428,7 +417,7 @@ or read the reference section of this documentation.

              -
              +
              @@ -445,7 +434,7 @@
              [Caution] Caution


              -

              [1] +

              [1] A type is signature-compatible with other type if it has the same signature for functions and metadata. Preconditions, postconditions and the order of operations need not be the same. diff --git a/doc/html/boost_bimap/performance.html b/doc/html/boost_bimap/performance.html index b974d09..ad9714b 100644 --- a/doc/html/boost_bimap/performance.html +++ b/doc/html/boost_bimap/performance.html @@ -3,8 +3,8 @@ Performance - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_bimap/rationale.html b/doc/html/boost_bimap/rationale.html index ecab6be..9fba32b 100644 --- a/doc/html/boost_bimap/rationale.html +++ b/doc/html/boost_bimap/rationale.html @@ -3,8 +3,8 @@ Rationale - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
              PrevUpHomeNext
              -
              +
              @@ -46,7 +46,7 @@ of email flowed between Joaquin and Matias. The juiciest parts of the conversations where extracted and rearranged here.

              -
              +
              @@ -57,7 +57,7 @@ at developers.

              [Note] Note
              -
              +
              @@ -79,8 +79,7 @@ The following interface is necessary for the relation class:

              -
              -typedef -unspecified- TA; typedef -unspecified- TB;
              +
              typedef -unspecified- TA; typedef -unspecified- TB;
               
               TA a, ai; TB b, bi;
               
              @@ -132,16 +131,16 @@
                       is very simple, and it is based heavily on the concepts of the STL. Given
                       a bimap<A,B> bm:
                     

              -
                -
              1. +
                  +
                1. bm.left is signature-compatible with a std::map<A,B>
                2. -
                3. +
                4. bm.right is signature-compatible with a std::map<B,A>
                5. -
                6. +
                7. bm is signature-compatible with a std::set<relation<A,B> >
                8. @@ -154,7 +153,7 @@ as being simple and powerful. This is the general design.

                  - + Relation Implementation
                  @@ -169,8 +168,7 @@ has two references named first and second that bind to A and B, or to B and A.

                  -
                  -relation<TA,TB> r;
                  +
                  relation<TA,TB> r;
                   
                   const_reference_pair<A,B> pba(r);
                   const_reference_pair<B,A> pbb(r);
                  @@ -195,8 +193,7 @@
                           clause that is not currently in the standard but is very natural. The additional
                           clause imposes that if we have two classes:
                         

                  -
                  -struct class_a_b
                  +
                  struct class_a_b
                   {
                       Type1 name_a;
                       Type2 name_b;
                  @@ -245,7 +242,7 @@
                           both cases, because we require that the same code be compilable by any standards-compliant
                           compiler.
                         

                  -
                  +
                  @@ -257,7 +254,7 @@

                  [Note] Note
                  - + Bimap Implementation
                  diff --git a/doc/html/boost_bimap/rationale/additional_features.html b/doc/html/boost_bimap/rationale/additional_features.html index 79749ca..c5a2c35 100644 --- a/doc/html/boost_bimap/rationale/additional_features.html +++ b/doc/html/boost_bimap/rationale/additional_features.html @@ -3,8 +3,8 @@ Additional Features - - + + @@ -14,21 +14,21 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                  PrevUpHomeNext
                  -
                  +
                  - + N-1, N-N, hashed maps
                  @@ -40,12 +40,12 @@ collection type of each key directly. In order to implement this feature, we have to solve two problems:

                  -
                    -
                  • +
                      +
                    • The index types of the multi_index_container core now depends on the collection type used for each key.
                    • -
                    • +
                    • The map views now change their semantics according to the collection type chosen.
                    • @@ -60,7 +60,7 @@ bimap.structures

                      - + Collection type of relation constraints
                      @@ -72,29 +72,29 @@ bases the collection type of relations on the left collection type, but the user may choose between:

                      -
                        -
                      • +
                          +
                        • left_based
                        • -
                        • +
                        • right_based
                        • -
                        • +
                        • set_of_relation<>
                        • -
                        • +
                        • multiset_of_relation<>
                        • -
                        • +
                        • unordered_set_of_relation<>
                        • -
                        • +
                        • unordered_multiset_of_relation<>
                        • -
                        • +
                        • list_of
                        • -
                        • +
                        • vector_of
                        @@ -104,7 +104,7 @@ uses further metaprogramming to define a new index if necessary.

                        - + Tagged

                        diff --git a/doc/html/boost_bimap/rationale/code.html b/doc/html/boost_bimap/rationale/code.html index b009f90..e885a42 100644 --- a/doc/html/boost_bimap/rationale/code.html +++ b/doc/html/boost_bimap/rationale/code.html @@ -3,8 +3,8 @@ Code - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


                        PrevUpHomeNext
                        -
                        +
                        @@ -34,7 +34,7 @@ Library Requirement and Guidelines as closely as possible.

                        -

                        Table 1.10. folders in boost/bimap

                        +

                        Table 1.10. folders in boost/bimap

                        @@ -125,7 +125,7 @@

                        -

                        Table 1.11. folders in each folder

                        +

                        Table 1.11. folders in each folder

                        diff --git a/doc/html/boost_bimap/rationale/the_student_and_the_mentor.html b/doc/html/boost_bimap/rationale/the_student_and_the_mentor.html index 78db622..ab4caaf 100644 --- a/doc/html/boost_bimap/rationale/the_student_and_the_mentor.html +++ b/doc/html/boost_bimap/rationale/the_student_and_the_mentor.html @@ -3,8 +3,8 @@ The student and the mentor - - + + @@ -14,20 +14,20 @@ - - + +
                        Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

                        PrevUpHomeNext
                        -
                        +
                        -
                        +
                        @@ -751,8 +751,7 @@

                        -
                        -relation<TA,TB> r;
                        +
                        relation<TA,TB> r;
                         const_reference_pair<A,B> pba(r);
                         const_reference_pair<B,A> pbb(r);
                         
                        @@ -1292,8 +1291,7 @@

                        -
                        -map_view x=...;
                        +
                        map_view x=...;
                         map_view y=...;
                         x=y;
                         
                        diff --git a/doc/html/boost_bimap/reference.html b/doc/html/boost_bimap/reference.html index 13f3cec..7b06a2c 100644 --- a/doc/html/boost_bimap/reference.html +++ b/doc/html/boost_bimap/reference.html @@ -3,8 +3,8 @@ Reference - - + + @@ -14,15 +14,15 @@
                        - - + +
                        [Tip] TipBoost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

                        PrevUpHomeNext
                        -
                        +
                        @@ -89,7 +89,7 @@ Views
                        -
                        +
                        @@ -99,54 +99,54 @@

                        Convenience

                        -
                        • +
                          • "boost/bimap.hpp" (includes "boost/bimap/bimap.hpp" and imports the bimap class to boost namespace)

                          Container

                          -
                          • +
                            • "boost/bimap/bimap.hpp" (includes "boost/bimap/set_of.hpp" and "boost/bimap/unconstrained_set_of.hpp")

                            Set Types

                            -
                              -
                            • +
                                +
                              • "boost/bimap/set_of.hpp"
                              • -
                              • +
                              • "boost/bimap/multiset_of.hpp"
                              • -
                              • +
                              • "boost/bimap/unordered_set_of.hpp"
                              • -
                              • +
                              • "boost/bimap/unordered_multiset_of.hpp"
                              • -
                              • +
                              • "boost/bimap/list_of.hpp"
                              • -
                              • +
                              • "boost/bimap/vector_of.hpp"
                              • -
                              • +
                              • "boost/bimap/unconstrained_set_of.hpp"

                              Boost Integration

                              -
                                -
                              • +
                                  +
                                • "boost/bimap/support/lambda.hpp"
                                • -
                                • +
                                • "boost/bimap/property_map/set_support.hpp"
                                • -
                                • +
                                • "boost/bimap/property_map/unordered_set_support.hpp"
                                diff --git a/doc/html/boost_bimap/reference/bimap_reference.html b/doc/html/boost_bimap/reference/bimap_reference.html index d601fc1..93c0dc6 100644 --- a/doc/html/boost_bimap/reference/bimap_reference.html +++ b/doc/html/boost_bimap/reference/bimap_reference.html @@ -3,8 +3,8 @@ Bimap Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                PrevUpHomeNext
                                -
                                +
                                @@ -53,7 +53,7 @@
                                Serialization
                                -
                                +

                                View concepts @@ -79,25 +79,25 @@ (such as uniqueness of elements). The global operations performed jointly in the any view can be reduced to six primitives:

                                -
                                  -
                                • +
                                    +
                                  • copying
                                  • -
                                  • +
                                  • insertion of an element
                                  • -
                                  • +
                                  • hinted insertion, where a pre-existing element is suggested in order to improve the efficiency of the operation
                                  • -
                                  • +
                                  • deletion of an element
                                  • -
                                  • +
                                  • replacement of the value of an element, which may trigger the rearrangement of this element in one or more views, or may forbid the replacement
                                  • -
                                  • +
                                  • modification of an element, and its subsequent rearrangement/banning by the various views
                                  • @@ -113,7 +113,7 @@

                                  -
                                  +

                                  Complexity signature @@ -129,28 +129,28 @@ its complexity signature, consisting of the following associated functions on the number of elements:

                                  -
                                    -
                                  • +
                                      +
                                    • c(n): copying
                                    • -
                                    • +
                                    • i(n): insertion
                                    • -
                                    • +
                                    • h(n): hinted insertion
                                    • -
                                    • +
                                    • d(n): deletion
                                    • -
                                    • +
                                    • r(n): replacement
                                    • -
                                    • +
                                    • m(n): modifying
                                    • @@ -168,22 +168,22 @@ to denote the above view, the complexity of insertion will now be O(i_l(n)+i_r(n)+i_a(n)). To abbreviate the notation, we adopt the following definitions:

                                      -
                                        -
                                      • C(n) = c_l(n) + c_r(n) [ + +
                                          +
                                        • C(n) = c_l(n) + c_r(n) [ + c_a(n) ]
                                        • -
                                        • I(n) = i_l(n) + i_r(n) [ + +
                                        • I(n) = i_l(n) + i_r(n) [ + i_a(n) ]
                                        • -
                                        • H(n) = h_l(n) + h_r(n) [ + +
                                        • H(n) = h_l(n) + h_r(n) [ + h_a(n) ]
                                        • -
                                        • D(n) = d_l(n) + d_r(n) [ + +
                                        • D(n) = d_l(n) + d_r(n) [ + d_a(n) ]
                                        • -
                                        • R(n) = r_l(n) + r_r(n) [ + +
                                        • R(n) = r_l(n) + r_r(n) [ + r_a(n) ]
                                        • -
                                        • M(n) = m_l(n) + m_r(n) [ + +
                                        • M(n) = m_l(n) + m_r(n) [ + m_a(n) ]
                                      -
                                      +

                                      Set type specification @@ -377,7 +377,7 @@

                                      -
                                      +
                                      @@ -387,13 +387,12 @@ uses the tagged idiom to let the user specify this tags.

                                      -
                                      +
                                      -
                                      -namespace boost {
                                      +
                                      namespace boost {
                                       namespace bimaps {
                                       
                                       template< class Type, typename Tag >
                                      @@ -485,7 +484,7 @@
                                       } // namespace boost
                                       
                                      -
                                      +

                                      Class template bimap @@ -507,7 +506,7 @@

                                      This is the main component of Boost.Bimap.

                                      -
                                      +
                                      @@ -516,7 +515,7 @@ we adopt the scheme outlined in the complexity signature section.

                                      -
                                      +
                                      Instantiation types @@ -525,32 +524,31 @@ bimap is instantiated with the following types:

                                      -
                                        -
                                      1. +
                                          +
                                        1. LeftCollectionType and RightCollectionType are collection type specifications optionally tagged, or any type optionally tagged, in which case that side acts as a set.
                                        2. -
                                        3. +
                                        4. AdditionalParameter_{1/2} can be any ordered subset of: -
                                            -
                                          • +
                                              +
                                            • CollectionTypeOfRelation specification
                                            • -
                                            • +
                                            • Allocator
                                      -
                                      +
                                      -
                                      -left_tag, right_tag
                                      +
                                      left_tag, right_tag
                                       

                                      @@ -563,8 +561,7 @@

                                      -
                                      -left_key_type, right_key_type
                                      +
                                      left_key_type, right_key_type
                                       

                                      @@ -577,8 +574,7 @@

                                      -
                                      -left_data_type, right_data_type
                                      +
                                      left_data_type, right_data_type
                                       

                                      @@ -591,8 +587,7 @@

                                      -
                                      -left_value_type, right_value_type
                                      +
                                      left_value_type, right_value_type
                                       

                                      @@ -604,8 +599,7 @@

                                      -
                                      -left_iterator, right_iterator
                                      +
                                      left_iterator, right_iterator
                                       left_const_iterator, right_const_iterator
                                       
                                      @@ -618,8 +612,7 @@

                                      -
                                      -left_map, right_map
                                      +
                                      left_map, right_map
                                       

                                      @@ -632,97 +625,92 @@

                                      -
                                      +
                                      -
                                      -bimap();
                                      +
                                      bimap();
                                       
                                      -
                                        -
                                      • +
                                          +
                                        • Effects: Constructs an empty bimap.
                                        • -
                                        • +
                                        • Complexity: Constant.
                                        -
                                        -template<typename InputIterator>
                                        +
                                        template<typename InputIterator>
                                         bimap(InputIterator first,InputIterator last);
                                         
                                        -
                                          -
                                        • +
                                            +
                                          • Requires: InputIterator is a model of Input Iterator over elements of type relation or a type convertible to relation. last is reachable from first.
                                          • -
                                          • +
                                          • Effects: Constructs an empty bimap and fills it with the elements in the range [first,last). Insertion of each element may or may not succeed depending on acceptance by the collection types of the bimap.
                                          • -
                                          • +
                                          • Complexity: O(m*H(m)), where m is the number of elements in [first,last).
                                          -
                                          -bimap(const bimap & x);
                                          +
                                          bimap(const bimap & x);
                                           
                                          -
                                            -
                                          • +
                                              +
                                            • Effects: Constructs a copy of x, copying its elements as well as its internal objects (key extractors, comparison objects, allocator.)
                                            • -
                                            • +
                                            • Postconditions:*this == x. The order of the views of the bimap is preserved as well.
                                            • -
                                            • +
                                            • Complexity: O(x.size()*log(x.size()) + C(x.size()))
                                            -
                                            -~bimap()
                                            +
                                            ~bimap()
                                             
                                            -
                                              -
                                            • +
                                                +
                                              • Effects: Destroys the bimap and all the elements contained. The order in which the elements are destroyed is not specified.
                                              • -
                                              • +
                                              • Complexity: O(n).
                                              -
                                              -bimap& operator=(const bimap& x);
                                              +
                                              bimap& operator=(const bimap& x);
                                               
                                              -
                                                -
                                              • +
                                                  +
                                                • Effects: Replaces the elements and internal objects of the bimap with copies from x.
                                                • -
                                                • +
                                                • Postconditions:*this==x. The order on the views of the bimap is preserved as well.
                                                • -
                                                • +
                                                • Returns: *this.
                                                • -
                                                • +
                                                • Complexity: O(n + x.size()*log(x.size()) + C(x.size())).
                                                • -
                                                • +
                                                • Exception safety: Strong, provided the copy and assignment operations of the types of ctor_args_list do not throw. @@ -731,7 +719,7 @@

                                                -
                                                +
                                                Projection operations @@ -741,164 +729,158 @@ v1 and v2, we say than an v1-iterator it1 and an v2-iterator it2 are equivalent if:

                                                -
                                                  -
                                                • +
                                                    +
                                                  • it1 == i1.end() AND it2 == i2.end(),
                                                  • -
                                                  • +
                                                  • OR it1 and it2 point to the same element.
                                                  -
                                                  -template< class IteratorType >
                                                  +
                                                  template< class IteratorType >
                                                   left_iterator project_left(IteratorType iter);
                                                   
                                                   template< class IteratorType >
                                                   left_const_iterator project_left(IteratorType iter) const;
                                                   
                                                  -
                                                    -
                                                  • +
                                                      +
                                                    • Requires:IteratorType is a bimap view iterator. it is a valid iterator of some view of *this (i.e. does not refer to some other bimap.)
                                                    • -
                                                    • +
                                                    • Effects: Returns a left map view iterator equivalent to it.
                                                    • -
                                                    • +
                                                    • Complexity: Constant.
                                                    • -
                                                    • +
                                                    • Exception safety: nothrow.
                                                    -
                                                    -template< class IteratorType >
                                                    +
                                                    template< class IteratorType >
                                                     right_iterator project_right(IteratorType iter);
                                                     
                                                     template< class IteratorType >
                                                     right_const_iterator project_right(IteratorType iter) const;
                                                     
                                                    -
                                                      -
                                                    • +
                                                        +
                                                      • Requires:IteratorType is a bimap view iterator. it is a valid iterator of some view of *this (i.e. does not refer to some other bimap.)
                                                      • -
                                                      • +
                                                      • Effects: Returns a right map view iterator equivalent to it.
                                                      • -
                                                      • +
                                                      • Complexity: Constant.
                                                      • -
                                                      • +
                                                      • Exception safety: nothrow.
                                                      -
                                                      -template< class IteratorType >
                                                      +
                                                      template< class IteratorType >
                                                       iterator project_up(IteratorType iter);
                                                       
                                                       template< class IteratorType >
                                                       const_iterator project_up(IteratorType iter) const;
                                                       
                                                      -
                                                        -
                                                      • +
                                                          +
                                                        • Requires:IteratorType is a bimap view iterator. it is a valid iterator of some view of *this (i.e. does not refer to some other bimap.)
                                                        • -
                                                        • +
                                                        • Effects: Returns a collection of relations view iterator equivalent to it.
                                                        • -
                                                        • +
                                                        • Complexity: Constant.
                                                        • -
                                                        • +
                                                        • Exception safety: nothrow.

                                                      -
                                                      +
                                                      -
                                                      -template< class Tag >
                                                      +
                                                      template< class Tag >
                                                       struct map_by;
                                                       
                                                      -
                                                        -
                                                      • +
                                                          +
                                                        • map_by<Tag>::type yields the type of the map view tagged with Tag. map_by<Tag>::-type name- is the same as map_by<Tag>::type::-type name-.
                                                        • -
                                                        • +
                                                        • Requires: Tag is a valid user defined name of the bimap.
                                                        -
                                                        -template< class Tag >
                                                        +
                                                        template< class Tag >
                                                         map_by<Tag>::type by();
                                                         
                                                         template< class Tag >
                                                         const map_by<Tag>::type & by() const;
                                                         
                                                        -
                                                          -
                                                        • +
                                                            +
                                                          • Requires: Tag is a valid user defined name of the bimap.
                                                          • -
                                                          • +
                                                          • Effects: Returns a reference to the map view tagged with Tag held by *this.
                                                          • -
                                                          • +
                                                          • Complexity: Constant.
                                                          • -
                                                          • +
                                                          • Exception safety: nothrow.
                                                          -
                                                          -template< class Tag, class IteratorType >
                                                          +
                                                          template< class Tag, class IteratorType >
                                                           map_by<Tag>::iterator project(IteratorType iter);
                                                           
                                                           template< class Tag, class IteratorType >
                                                           map_by<Tag>::const_iterator project(IteratorType iter) const
                                                           
                                                          -
                                                            -
                                                          • +
                                                              +
                                                            • Requires: Tag is a valid user defined name of the bimap. IteratorType is a bimap view iterator. it is a valid iterator of some view of *this (i.e. does not refer to some other bimap.)
                                                            • -
                                                            • +
                                                            • Effects: Returns a reference to the map view tagged with Tag held by *this.
                                                            • -
                                                            • +
                                                            • Complexity: Constant.
                                                            • -
                                                            • +
                                                            • Exception safety: nothrow.
                                                          -
                                                          +
                                                          @@ -925,7 +907,7 @@ is serialization-compatible with p if

                                                          -
                                                          • +
                                                            • p(x,y) == q(x',y')

                                                            @@ -940,12 +922,12 @@ to an output archive (XML archive) ar.

                                                          -
                                                            -
                                                          • +
                                                              +
                                                            • Requires: Value is serializable (XML-serializable). Additionally, each of the views of b can impose other requirements.
                                                            • -
                                                            • +
                                                            • Exception safety: Strong with respect to b. If an exception is thrown, ar may be left in an inconsistent state. @@ -958,13 +940,13 @@ archive) ar.

                                                            -
                                                              -
                                                            • +
                                                                +
                                                              • Requires: Value is serializable (XML-serializable). Additionally, each of the views of b' can impose other requirements.
                                                              • -
                                                              • +
                                                              • Exception safety: Basic. If an exception is thrown, ar may be left in an inconsistent state.
                                                              • diff --git a/doc/html/boost_bimap/reference/list_of_reference.html b/doc/html/boost_bimap/reference/list_of_reference.html index 8fd0023..1d467d5 100644 --- a/doc/html/boost_bimap/reference/list_of_reference.html +++ b/doc/html/boost_bimap/reference/list_of_reference.html @@ -3,8 +3,8 @@ list_of Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                PrevUpHomeNext
                                                                -
                                                                +
                                                                @@ -48,13 +48,12 @@
                                                                Serialization
                                                                -
                                                                +
                                                                -
                                                                -namespace boost {
                                                                +
                                                                namespace boost {
                                                                 namespace bimaps {
                                                                 
                                                                 
                                                                @@ -68,7 +67,7 @@
                                                                 } // namespace boost
                                                                 
                                                                -
                                                                +

                                                                list_of Views @@ -109,17 +108,17 @@

                                                                There are a number of differences with respect to std::lists:

                                                                -
                                                                  -
                                                                • +
                                                                    +
                                                                  • list_of views are not Assignable (like any other view.)
                                                                  • -
                                                                  • +
                                                                  • Unlike as in std::list, insertions into a list_of view may fail due to clashings with other views. This alters the semantics of the operations provided with respect to their analogues in std::list.
                                                                  • -
                                                                  • +
                                                                  • Elements in a list_of view are not mutable, and can only be changed by means of replace and modify member functions. @@ -133,8 +132,7 @@ and operations that are either not present in the concepts modeled or do not exactly conform to the requirements for these types of containers.

                                                                    -
                                                                    -namespace boost {
                                                                    +
                                                                    namespace boost {
                                                                     namespace bimaps {
                                                                     namespace views {
                                                                     
                                                                    @@ -295,15 +293,13 @@
                                                                     

                                                                    In the set view:

                                                                    -
                                                                    -typedef signature-compatible with relation< Left, ... > key_type;
                                                                    +
                                                                    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  Left  key_type;
                                                                     typedef  ...   data_type;
                                                                     
                                                                     typedef signature-compatible with std::pair< Left, ... > value_type;
                                                                    @@ -311,15 +307,14 @@
                                                                     

                                                                    In the right map view:

                                                                    -
                                                                    -typedef  ...  key_type;
                                                                    +
                                                                    typedef  ...  key_type;
                                                                     typedef  Left data_type;
                                                                     
                                                                     typedef signature-compatible with std::pair< ... , Left > value_type;
                                                                     

                                                                    -
                                                                    +
                                                                    Complexity signature @@ -329,28 +324,28 @@ views, we adopt the scheme outlined in the complexity signature section. The complexity signature of a list_of view is:

                                                                    -
                                                                      -
                                                                    • +
                                                                        +
                                                                      • copying: c(n) = n * log(n),
                                                                      • -
                                                                      • +
                                                                      • insertion: i(n) = 1 (constant),
                                                                      • -
                                                                      • +
                                                                      • hinted insertion: h(n) = 1 (constant),
                                                                      • -
                                                                      • +
                                                                      • deletion: d(n) = 1 (constant),
                                                                      • -
                                                                      • +
                                                                      • replacement: r(n) = 1 (constant),
                                                                      • -
                                                                      • +
                                                                      • modifying: m(n) = 1 (constant).
                                                                    -
                                                                    +
                                                                    Instantiation types @@ -361,16 +356,16 @@ specified by means of the collection type specifiers and the bimap itself. Instantiations are dependent on the following types:

                                                                    -
                                                                      -
                                                                    • +
                                                                        +
                                                                      • Value from list_of,
                                                                      • -
                                                                      • +
                                                                      • Allocator from bimap,
                                                                    -
                                                                    +
                                                                    Constructors, copy and assignment @@ -379,27 +374,25 @@ As explained in the view concepts section, views do not have public constructors or destructors. Assignment, on the other hand, is provided.

                                                                    -
                                                                    -this_type & operator=(const this_type & x);
                                                                    +
                                                                    this_type & operator=(const this_type & x);
                                                                     
                                                                    -
                                                                      -
                                                                    • +
                                                                        +
                                                                      • Effects: a = b; where a and b are the bimap objects to which *this and x belong, respectively.
                                                                      • -
                                                                      • +
                                                                      • Returns: *this.

                                                                      -
                                                                      -template< class InputIterator >
                                                                      +
                                                                      template< class InputIterator >
                                                                       void assign(InputIterator first, InputIterator last);
                                                                       
                                                                      -
                                                                        -
                                                                      • +
                                                                          +
                                                                        • Requires: InputIterator is a model of Input Iterator over elements of type value_type @@ -408,16 +401,15 @@ last is reachable from first.
                                                                        • -
                                                                        • +
                                                                        • Effects: clear(); insert(end(),first,last);

                                                                        -
                                                                        -void assign(size_type n, const value_type & value);
                                                                        +
                                                                        void assign(size_type n, const value_type & value);
                                                                         
                                                                        -
                                                                        • +
                                                                          • Effects: clear(); for(size_type i = 0; @@ -426,18 +418,17 @@ ++n) push_back(v);
                                                                        -
                                                                        +

                                                                        -
                                                                        -void resize(size_type n,const value_type& x=value_type()); 
                                                                        +
                                                                        void resize(size_type n,const value_type& x=value_type()); 
                                                                         
                                                                        -
                                                                          -
                                                                        • +
                                                                            +
                                                                          • Effects: if( n > size() ) insert(end(), n - size(), @@ -445,28 +436,27 @@ it = begin(); std::advance(it, n); erase(it, end());}
                                                                          • -
                                                                          • +
                                                                          • Note: If an expansion is requested, the size of the view is not guaranteed to be n after this operation (other views may ban insertions.)
                                                                        -
                                                                        +

                                                                        -
                                                                        -std::pair<iterator,bool> push_front(const value_type& x);
                                                                        +
                                                                        std::pair<iterator,bool> push_front(const value_type& x);
                                                                         
                                                                        -
                                                                          -
                                                                        • +
                                                                            +
                                                                          • Effects: Inserts x at the beginning of the sequence if no other views of the bimap bans the insertion.
                                                                          • -
                                                                          • +
                                                                          • Returns: The return value is a pair p. p.second is true if and only if @@ -475,26 +465,25 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                          • -
                                                                          • +
                                                                          • Complexity: O(I(n)).
                                                                          • -
                                                                          • +
                                                                          • Exception safety: Strong.

                                                                          -
                                                                          -std::pair<iterator,bool> push_back(const value_type & x);
                                                                          +
                                                                          std::pair<iterator,bool> push_back(const value_type & x);
                                                                           
                                                                          -
                                                                            -
                                                                          • +
                                                                              +
                                                                            • Effects: Inserts x at the end of the sequence if no other views of the bimap bans the insertion.
                                                                            • -
                                                                            • +
                                                                            • Returns: The return value is a pair p. p.second is true if and only if @@ -503,31 +492,30 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                            • -
                                                                            • +
                                                                            • Complexity: O(I(n)).
                                                                            • -
                                                                            • +
                                                                            • Exception safety: Strong.

                                                                            -
                                                                            -std::pair<iterator,bool> insert(iterator position, const value_type & x);
                                                                            +
                                                                            std::pair<iterator,bool> insert(iterator position, const value_type & x);
                                                                             
                                                                            -
                                                                              -
                                                                            • +
                                                                                +
                                                                              • Requires: position is a valid iterator of the view.
                                                                              • -
                                                                              • +
                                                                              • Effects: Inserts x before position if insertion is allowed by all other views of the bimap.
                                                                              • -
                                                                              • +
                                                                              • Returns: The return value is a pair p. p.second is true if and only if @@ -536,26 +524,25 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                              • -
                                                                              • +
                                                                              • Complexity: O(I(n)).
                                                                              • -
                                                                              • +
                                                                              • Exception safety: Strong.

                                                                              -
                                                                              -void insert(iterator position, size_type n, const value_type & x);
                                                                              +
                                                                              void insert(iterator position, size_type n, const value_type & x);
                                                                               
                                                                              -
                                                                                -
                                                                              • +
                                                                                  +
                                                                                • Requires: position is a valid iterator of the view.
                                                                                • -
                                                                                • +
                                                                                • Effects: for(size_type i = 0; @@ -566,12 +553,11 @@

                                                                                -
                                                                                -template< class InputIterator>
                                                                                +
                                                                                template< class InputIterator>
                                                                                 void insert(iterator position,InputIterator first,InputIterator last);
                                                                                 
                                                                                -
                                                                                  -
                                                                                • +
                                                                                    +
                                                                                  • Requires: position is a valid iterator of the view. InputIterator @@ -582,99 +568,96 @@ this view belongs. last is reachable from first.
                                                                                  • -
                                                                                  • +
                                                                                  • Effects: while(first != last) insert(position, *first++);
                                                                                  • -
                                                                                  • +
                                                                                  • Complexity: O(m*I(n+m)), where m is the number of elements in [first,last).
                                                                                  • -
                                                                                  • +
                                                                                  • Exception safety: Basic.

                                                                                  -
                                                                                  -iterator erase(iterator position);
                                                                                  +
                                                                                  iterator erase(iterator position);
                                                                                   
                                                                                  -
                                                                                    -
                                                                                  • +
                                                                                      +
                                                                                    • Requires: position is a valid dereferenceable iterator of the view.
                                                                                    • -
                                                                                    • +
                                                                                    • Effects: Deletes the element pointed to by position.
                                                                                    • -
                                                                                    • +
                                                                                    • Returns: An iterator pointing to the element immediately following the one that was deleted, or end() if no such element exists.
                                                                                    • -
                                                                                    • +
                                                                                    • Complexity: O(D(n)).
                                                                                    • -
                                                                                    • +
                                                                                    • Exception safety: nothrow.

                                                                                    -
                                                                                    -iterator erase(iterator first, iterator last); 
                                                                                    +
                                                                                    iterator erase(iterator first, iterator last); 
                                                                                     
                                                                                    -
                                                                                      -
                                                                                    • +
                                                                                        +
                                                                                      • Requires: [first,last) is a valid range of the view.
                                                                                      • -
                                                                                      • +
                                                                                      • Effects: Deletes the elements in [first,last).
                                                                                      • -
                                                                                      • +
                                                                                      • Returns: last.
                                                                                      • -
                                                                                      • +
                                                                                      • Complexity: O(m*D(n)), where m is the number of elements in [first,last).
                                                                                      • -
                                                                                      • +
                                                                                      • Exception safety: nothrow.

                                                                                      -
                                                                                      -bool replace(iterator position,const value_type& x);
                                                                                      +
                                                                                      bool replace(iterator position,const value_type& x);
                                                                                       
                                                                                      -
                                                                                        -
                                                                                      • +
                                                                                          +
                                                                                        • Requires: position is a valid dereferenceable iterator of the view.
                                                                                        • -
                                                                                        • +
                                                                                        • Effects: Assigns the value x to the element pointed to by position into the bimap to which the view belongs if replacing is allowed by all other views of the bimap.
                                                                                        • -
                                                                                        • +
                                                                                        • Postconditions: Validity of position is preserved in all cases.
                                                                                        • -
                                                                                        • +
                                                                                        • Returns: true if the replacement took place, false otherwise.
                                                                                        • -
                                                                                        • +
                                                                                        • Complexity: O(R(n)).
                                                                                        • -
                                                                                        • +
                                                                                        • Exception safety: Strong. If an exception is thrown by some user-provided operation the bimap to which the view belongs remains in its original state. @@ -682,17 +665,16 @@

                                                                                        -
                                                                                        -template< class CompatibleKey >
                                                                                        +
                                                                                        template< class CompatibleKey >
                                                                                         bool replace_key(iterator position, const CompatibleKey & x);
                                                                                         
                                                                                        -
                                                                                          -
                                                                                        • +
                                                                                            +
                                                                                          • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to key_type.
                                                                                          • -
                                                                                          • +
                                                                                          • Effects: Assigns the value x to e.first, where e is the element pointed to by position @@ -700,20 +682,20 @@ the set view belongs if replacing is allowed by all other views of the bimap.
                                                                                          • -
                                                                                          • +
                                                                                          • Postconditions: Validity of position is preserved in all cases.
                                                                                          • -
                                                                                          • +
                                                                                          • Returns: true if the replacement took place, false otherwise.
                                                                                          • -
                                                                                          • +
                                                                                          • Complexity: O(R(n)).
                                                                                          • -
                                                                                          • +
                                                                                          • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -721,17 +703,16 @@

                                                                                          -
                                                                                          -template< class CompatibleData >
                                                                                          +
                                                                                          template< class CompatibleData >
                                                                                           bool replace_data(iterator position, const CompatibleData & x);
                                                                                           
                                                                                          -
                                                                                            -
                                                                                          • +
                                                                                              +
                                                                                            • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to data_type.
                                                                                            • -
                                                                                            • +
                                                                                            • Effects: Assigns the value x to e.second, where e is the element pointed to by position @@ -739,20 +720,20 @@ the set view belongs if replacing is allowed by all other views of the bimap.
                                                                                            • -
                                                                                            • +
                                                                                            • Postconditions: Validity of position is preserved in all cases.
                                                                                            • -
                                                                                            • +
                                                                                            • Returns: true if the replacement took place, false otherwise.
                                                                                            • -
                                                                                            • +
                                                                                            • Complexity: O(R(n)).
                                                                                            • -
                                                                                            • +
                                                                                            • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -760,90 +741,88 @@

                                                                                            -
                                                                                            -template< class KeyModifier >
                                                                                            +
                                                                                            template< class KeyModifier >
                                                                                             bool modify_key(iterator position, KeyModifier mod);
                                                                                             
                                                                                            -
                                                                                              -
                                                                                            • +
                                                                                                +
                                                                                              • Requires: KeyModifier is a model of Unary Function accepting arguments of type: key_type&; position is a valid dereferenceable iterator of the view.
                                                                                              • -
                                                                                              • +
                                                                                              • Effects: Calls mod(e.first) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. It is successful if the rearrangement is allowed by all other views of the bimap.
                                                                                              • -
                                                                                              • +
                                                                                              • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                              • -
                                                                                              • +
                                                                                              • Returns: true if the operation succeeded, false otherwise.
                                                                                              • -
                                                                                              • +
                                                                                              • Complexity: O(M(n)).
                                                                                              • -
                                                                                              • +
                                                                                              • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                              • -
                                                                                              • +
                                                                                              • Note: Only provided for map views.

                                                                                              -
                                                                                              -template< class DataModifier >
                                                                                              +
                                                                                              template< class DataModifier >
                                                                                               bool modify_data(iterator position, DataModifier mod);
                                                                                               
                                                                                              -
                                                                                                -
                                                                                              • +
                                                                                                  +
                                                                                                • Requires: DataModifier is a model of Unary Function accepting arguments of type: data_type&; position is a valid dereferenceable iterator of the view.
                                                                                                • -
                                                                                                • +
                                                                                                • Effects: Calls mod(e.second) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. It is successful if the rearrangement is allowed by all other views of the bimap.
                                                                                                • -
                                                                                                • +
                                                                                                • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                • -
                                                                                                • +
                                                                                                • Returns: true if the operation succeeded, false otherwise.
                                                                                                • -
                                                                                                • +
                                                                                                • Complexity: O(M(n)).
                                                                                                • -
                                                                                                • +
                                                                                                • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                • -
                                                                                                • +
                                                                                                • Note: Only provided for map views.
                                                                                              -
                                                                                              +
                                                                                              List operations @@ -859,67 +838,64 @@

                                                                                              -
                                                                                              -void splice(iterator position, this_type & x);
                                                                                              +
                                                                                              void splice(iterator position, this_type & x);
                                                                                               
                                                                                              -
                                                                                                -
                                                                                              • +
                                                                                                  +
                                                                                                • Requires: position is a valid iterator of the view. &x!=this.
                                                                                                • -
                                                                                                • +
                                                                                                • Effects: Inserts the contents of x before position, in the same order as they were in x. Those elements successfully inserted are erased from x.
                                                                                                • -
                                                                                                • +
                                                                                                • Complexity: O(x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                • -
                                                                                                • +
                                                                                                • Exception safety: Basic.

                                                                                                -
                                                                                                -void splice(iterator position, this_type & x,iterator i);
                                                                                                +
                                                                                                void splice(iterator position, this_type & x,iterator i);
                                                                                                 
                                                                                                -
                                                                                                  -
                                                                                                • +
                                                                                                    +
                                                                                                  • Requires: position is a valid iterator of the view. i is a valid dereferenceable iterator x.
                                                                                                  • -
                                                                                                  • +
                                                                                                  • Effects: Inserts the element pointed to by i before position: if insertion is successful, the element is erased from x. In the special case &x==this, no copy or deletion is performed, and the operation is always successful. If position==i, no operation is performed.
                                                                                                  • -
                                                                                                  • +
                                                                                                  • Postconditions: If &x==this, no iterator or reference is invalidated.
                                                                                                  • -
                                                                                                  • +
                                                                                                  • Complexity: If &x==this, constant; otherwise O(I(n) + D(n)).
                                                                                                  • -
                                                                                                  • +
                                                                                                  • Exception safety: If &x==this, nothrow; otherwise, strong.

                                                                                                  -
                                                                                                  -void splice(iterator position, this_type & x, iterator first, iterator last);
                                                                                                  +
                                                                                                  void splice(iterator position, this_type & x, iterator first, iterator last);
                                                                                                   
                                                                                                  -
                                                                                                    -
                                                                                                  • +
                                                                                                      +
                                                                                                    • Requires: position is a valid iterator of the view. first and last are valid @@ -927,119 +903,114 @@ is reachable from first. position is not in the range [first,last).
                                                                                                    • -
                                                                                                    • +
                                                                                                    • Effects: For each element in the range [first,last), insertion is tried before position; if the operation is successful, the element is erased from x. In the special case &x==this, no copy or deletion is performed, and insertions are always successful.
                                                                                                    • -
                                                                                                    • +
                                                                                                    • Postconditions: If &x==this, no iterator or reference is invalidated.
                                                                                                    • -
                                                                                                    • +
                                                                                                    • Complexity: If &x==this, constant; otherwise O(m*I(n+m) + m*D(x.size())) where m is the number of elements in [first,last).
                                                                                                    • -
                                                                                                    • +
                                                                                                    • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                    -
                                                                                                    -void remove(const value_type & value);
                                                                                                    +
                                                                                                    void remove(const value_type & value);
                                                                                                     
                                                                                                    -
                                                                                                      -
                                                                                                    • +
                                                                                                        +
                                                                                                      • Effects: Erases all elements of the view which compare equal to value.
                                                                                                      • -
                                                                                                      • +
                                                                                                      • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                      • -
                                                                                                      • +
                                                                                                      • Exception safety: Basic.

                                                                                                      -
                                                                                                      -template< class Predicate >
                                                                                                      +
                                                                                                      template< class Predicate >
                                                                                                       void remove_if(Predicate pred);
                                                                                                       
                                                                                                      -
                                                                                                        -
                                                                                                      • +
                                                                                                          +
                                                                                                        • Effects: Erases all elements x of the view for which pred(x) holds.
                                                                                                        • -
                                                                                                        • +
                                                                                                        • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                        • -
                                                                                                        • +
                                                                                                        • Exception safety: Basic.

                                                                                                        -
                                                                                                        -void unique();
                                                                                                        +
                                                                                                        void unique();
                                                                                                         
                                                                                                        -
                                                                                                          -
                                                                                                        • +
                                                                                                            +
                                                                                                          • Effects: Eliminates all but the first element from every consecutive group of equal elements referred to by the iterator i in the range [first+1,last) for which *i==*(i-1).
                                                                                                          • -
                                                                                                          • +
                                                                                                          • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                          • -
                                                                                                          • +
                                                                                                          • Exception safety: Basic.

                                                                                                          -
                                                                                                          -template< class BinaryPredicate >
                                                                                                          +
                                                                                                          template< class BinaryPredicate >
                                                                                                           void unique(BinaryPredicate binary_pred);
                                                                                                           
                                                                                                          -
                                                                                                            -
                                                                                                          • +
                                                                                                              +
                                                                                                            • Effects: Eliminates all but the first element from every consecutive group of elements referred to by the iterator i in the range [first+1,last) for which binary_pred(*i,*(i-1)) holds.
                                                                                                            • -
                                                                                                            • +
                                                                                                            • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                            • -
                                                                                                            • +
                                                                                                            • Exception safety: Basic.

                                                                                                            -
                                                                                                            -void merge(this_type & x);
                                                                                                            +
                                                                                                            void merge(this_type & x);
                                                                                                             
                                                                                                            -
                                                                                                              -
                                                                                                            • +
                                                                                                                +
                                                                                                              • Requires: std::less<value_type> is a Strict Weak Ordering over value_type. Both the view and x are sorted according to std::less<value_type>.
                                                                                                              • -
                                                                                                              • +
                                                                                                              • Effects: Attempts to insert every element of x into the corresponding position of the view (according to the order). Elements @@ -1048,37 +1019,36 @@ container preserve their relative position. In the special case &x==this, no operation is performed.
                                                                                                              • -
                                                                                                              • +
                                                                                                              • Postconditions: Elements in the view and remaining elements in x are sorted. Validity of iterators to the view and of non-erased elements of x references is preserved.
                                                                                                              • -
                                                                                                              • +
                                                                                                              • Complexity: If &x==this, constant; otherwise O(n + x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                              • -
                                                                                                              • +
                                                                                                              • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                              -
                                                                                                              -template< class Compare >
                                                                                                              +
                                                                                                              template< class Compare >
                                                                                                               void merge(this_type & x, Compare comp);
                                                                                                               
                                                                                                              -
                                                                                                                -
                                                                                                              • +
                                                                                                                  +
                                                                                                                • Requires: Compare is a Strict Weak Ordering over value_type. Both the view and x are sorted according to comp.
                                                                                                                • -
                                                                                                                • +
                                                                                                                • Effects: Attempts to insert every element of x into the corresponding position of the view (according to comp). @@ -1087,101 +1057,98 @@ container preserve their relative position. In the special case &x==this, no operation is performed.
                                                                                                                • -
                                                                                                                • +
                                                                                                                • Postconditions: Elements in the view and remaining elements in x are sorted according to comp. Validity of iterators to the view and of non-erased elements of x references is preserved.
                                                                                                                • -
                                                                                                                • +
                                                                                                                • Complexity: If &x==this, constant; otherwise O(n + x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                                • -
                                                                                                                • +
                                                                                                                • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                                -
                                                                                                                -void sort();
                                                                                                                +
                                                                                                                void sort();
                                                                                                                 
                                                                                                                -
                                                                                                                  -
                                                                                                                • +
                                                                                                                    +
                                                                                                                  • Requires: std::less<value_type> is a Strict Weak Ordering over value_type.
                                                                                                                  • -
                                                                                                                  • +
                                                                                                                  • Effects: Sorts the view according to std::less<value_type>. The sorting is stable, i.e. equivalent elements preserve their relative position.
                                                                                                                  • -
                                                                                                                  • +
                                                                                                                  • Postconditions: Validity of iterators and references is preserved.
                                                                                                                  • -
                                                                                                                  • +
                                                                                                                  • Complexity: O(n*log(n)).
                                                                                                                  • -
                                                                                                                  • +
                                                                                                                  • Exception safety: nothrow if std::less<value_type> does not throw; otherwise, basic.

                                                                                                                  -
                                                                                                                  -template< typename Compare >
                                                                                                                  +
                                                                                                                  template< typename Compare >
                                                                                                                   void sort(Compare comp);
                                                                                                                   
                                                                                                                  -
                                                                                                                    -
                                                                                                                  • +
                                                                                                                      +
                                                                                                                    • Requires: Compare is a Strict Weak Ordering over value_type.
                                                                                                                    • -
                                                                                                                    • +
                                                                                                                    • Effects: Sorts the view according to comp. The sorting is stable, i.e. equivalent elements preserve their relative position.
                                                                                                                    • -
                                                                                                                    • +
                                                                                                                    • Postconditions: Validity of iterators and references is preserved.
                                                                                                                    • -
                                                                                                                    • +
                                                                                                                    • Complexity: O(n*log(n)).
                                                                                                                    • -
                                                                                                                    • +
                                                                                                                    • Exception safety: nothrow if comp does not throw; otherwise, basic.

                                                                                                                    -
                                                                                                                    -void reverse();
                                                                                                                    +
                                                                                                                    void reverse();
                                                                                                                     
                                                                                                                    -
                                                                                                                      -
                                                                                                                    • +
                                                                                                                        +
                                                                                                                      • Effects: Reverses the order of the elements in the view.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Postconditions: Validity of iterators and references is preserved.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Complexity: O(n).
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Exception safety: nothrow.
                                                                                                                    -
                                                                                                                    +
                                                                                                                    Rearrange operations @@ -1193,38 +1160,36 @@

                                                                                                                    -
                                                                                                                    -void relocate(iterator position, iterator i);
                                                                                                                    +
                                                                                                                    void relocate(iterator position, iterator i);
                                                                                                                     
                                                                                                                    -
                                                                                                                      -
                                                                                                                    • +
                                                                                                                        +
                                                                                                                      • Requires: position is a valid iterator of the view. i is a valid dereferenceable iterator of the view.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Effects: Inserts the element pointed to by i before position. If position==i, no operation is performed.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Postconditions: No iterator or reference is invalidated.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Complexity: Constant.
                                                                                                                      • -
                                                                                                                      • +
                                                                                                                      • Exception safety: nothrow.

                                                                                                                      -
                                                                                                                      -void relocate(iterator position, iterator first, iterator last);
                                                                                                                      +
                                                                                                                      void relocate(iterator position, iterator first, iterator last);
                                                                                                                       
                                                                                                                      -
                                                                                                                        -
                                                                                                                      • +
                                                                                                                          +
                                                                                                                        • Requires: position is a valid iterator of the view. first and last are valid @@ -1233,22 +1198,22 @@ position is not in the range [first,last).
                                                                                                                        • -
                                                                                                                        • +
                                                                                                                        • Effects: The range of elements [first,last) is repositioned just before position.
                                                                                                                        • -
                                                                                                                        • +
                                                                                                                        • Postconditions: No iterator or reference is invalidated.
                                                                                                                        • -
                                                                                                                        • +
                                                                                                                        • Complexity: Constant.
                                                                                                                        • -
                                                                                                                        • +
                                                                                                                        • Exception safety: nothrow.
                                                                                                                      -
                                                                                                                      +
                                                                                                                      @@ -1267,7 +1232,7 @@ ar.

                                                                                                                      -
                                                                                                                      • +
                                                                                                                        • Requires: No additional requirements to those imposed by the container.
                                                                                                                        @@ -1278,7 +1243,7 @@ archive) ar.

                                                                                                                      -
                                                                                                                      • +
                                                                                                                        • Requires: No additional requirements to those imposed by the container. Postconditions: On successful loading, each of the elements of [begin(), @@ -1296,7 +1261,7 @@ it to an output archive (XML archive) ar.

                                                                                                                        -
                                                                                                                        • +
                                                                                                                          • Requires: it is a valid iterator of the view. The associated bimap has been previously saved. @@ -1309,14 +1274,14 @@ archive) ar.

                                                                                                                          -
                                                                                                                            -
                                                                                                                          • +
                                                                                                                              +
                                                                                                                            • Postconditions: On successful loading, if it was dereferenceable then *it' is the restored copy of *it, otherwise it' == end().
                                                                                                                            • -
                                                                                                                            • +
                                                                                                                            • Note: It is allowed that it be a const_iterator and the restored it' an iterator, or viceversa. diff --git a/doc/html/boost_bimap/reference/set_of_reference.html b/doc/html/boost_bimap/reference/set_of_reference.html index c67421b..190376d 100644 --- a/doc/html/boost_bimap/reference/set_of_reference.html +++ b/doc/html/boost_bimap/reference/set_of_reference.html @@ -3,8 +3,8 @@ set_of Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                              PrevUpHomeNext
                                                                                                                              -
                                                                                                                              +
                                                                                                                              @@ -52,13 +52,12 @@
                                                                                                                              Serialization
                                                                                                                              -
                                                                                                                              +
                                                                                                                              -
                                                                                                                              -namespace boost {
                                                                                                                              +
                                                                                                                              namespace boost {
                                                                                                                               namespace bimaps {
                                                                                                                               
                                                                                                                               
                                                                                                                              @@ -81,13 +80,12 @@
                                                                                                                               } // namespace boost
                                                                                                                               
                                                                                                                              -
                                                                                                                              +
                                                                                                                              -
                                                                                                                              -namespace boost {
                                                                                                                              +
                                                                                                                              namespace boost {
                                                                                                                               namespace bimaps {
                                                                                                                               
                                                                                                                               
                                                                                                                              @@ -110,7 +108,7 @@
                                                                                                                               } // namespace boost
                                                                                                                               
                                                                                                                              -
                                                                                                                              +

                                                                                                                              Collection type specifiers set_of and multiset_of @@ -121,7 +119,7 @@ coincide, so they are described together.

                                                                                                                              -
                                                                                                                              +

                                                                                                                              [multi]set_of Views @@ -157,8 +155,7 @@ If you look the bimap from a side, you will use a map view, and if you look at it as a whole, you will be using a set view.

                                                                                                                              -
                                                                                                                              -namespace boost {
                                                                                                                              +
                                                                                                                              namespace boost {
                                                                                                                               namespace bimaps {
                                                                                                                               namespace views {
                                                                                                                               
                                                                                                                              @@ -356,15 +353,13 @@
                                                                                                                               

                                                                                                                              In the set view:

                                                                                                                              -
                                                                                                                              -typedef signature-compatible with relation<       Left, ... > key_type;
                                                                                                                              +
                                                                                                                              typedef signature-compatible with relation<       Left, ... > key_type;
                                                                                                                               typedef signature-compatible with relation< const Left, ... > value_type;
                                                                                                                               

                                                                                                                              In the left map view:

                                                                                                                              -
                                                                                                                              -typedef  Left  key_type;
                                                                                                                              +
                                                                                                                              typedef  Left  key_type;
                                                                                                                               typedef  ...   data_type;
                                                                                                                               
                                                                                                                               typedef signature-compatible with std::pair< const Left, ... > value_type;
                                                                                                                              @@ -372,15 +367,14 @@
                                                                                                                               

                                                                                                                              In the right map view:

                                                                                                                              -
                                                                                                                              -typedef  ...  key_type;
                                                                                                                              +
                                                                                                                              typedef  ...  key_type;
                                                                                                                               typedef  Left data_type;
                                                                                                                               
                                                                                                                               typedef signature-compatible with std::pair< ... ,const Left > value_type;
                                                                                                                               

                                                                                                                              -
                                                                                                                              +
                                                                                                                              Complexity signature @@ -391,35 +385,35 @@ signature section. The complexity signature of [multi]set_of view is:

                                                                                                                              -
                                                                                                                                -
                                                                                                                              • +
                                                                                                                                  +
                                                                                                                                • copying: c(n) = n * log(n),
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • insertion: i(n) = log(n),
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • hinted insertion: h(n) = 1 (constant) if the hint element precedes the point of insertion, h(n) = log(n) otherwise,
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • deletion: d(n) = 1 (amortized constant),
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • replacement: r(n) = 1 (constant) if the element position does not change, r(n) = log(n) otherwise,
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • modifying: m(n) = 1 (constant) if the element position does not change, m(n) = log(n) otherwise.
                                                                                                                              -
                                                                                                                              +
                                                                                                                              Instantiation types @@ -428,15 +422,15 @@ Set views are instantiated internally to a bimap. Instantiations are dependent on the following types:

                                                                                                                              -
                                                                                                                                -
                                                                                                                              • +
                                                                                                                                  +
                                                                                                                                • Value from the set specifier,
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • Allocator from bimap,
                                                                                                                                • -
                                                                                                                                • +
                                                                                                                                • Compare from the set specifier.
                                                                                                                                • @@ -446,7 +440,7 @@ Weak Ordering on elements of Value.

                                                                                                                                -
                                                                                                                                +
                                                                                                                                Constructors, copy and assignment @@ -455,45 +449,43 @@ Set views do not have public constructors or destructors. Assignment, on the other hand, is provided.

                                                                                                                                -
                                                                                                                                -this_type & operator=(const this_type & x);
                                                                                                                                +
                                                                                                                                this_type & operator=(const this_type & x);
                                                                                                                                 
                                                                                                                                -
                                                                                                                                  -
                                                                                                                                • +
                                                                                                                                    +
                                                                                                                                  • Effects: a = b; where a and b are the bimap objects to which *this and x belong, respectively.
                                                                                                                                  • -
                                                                                                                                  • +
                                                                                                                                  • Returns: *this.
                                                                                                                                -
                                                                                                                                +

                                                                                                                                -
                                                                                                                                -std::pair<iterator,bool> insert(const value_type & x);
                                                                                                                                +
                                                                                                                                std::pair<iterator,bool> insert(const value_type & x);
                                                                                                                                 
                                                                                                                                -
                                                                                                                                  -
                                                                                                                                • +
                                                                                                                                    +
                                                                                                                                  • Effects: Inserts x into the bimap to which the set view belongs if -
                                                                                                                                      -
                                                                                                                                    • +
                                                                                                                                        +
                                                                                                                                      • the set view is non-unique OR no other element with equivalent key exists,
                                                                                                                                      • -
                                                                                                                                      • +
                                                                                                                                      • AND insertion is allowed by the other set specifications the bimap.
                                                                                                                                    • -
                                                                                                                                    • +
                                                                                                                                    • Returns: The return value is a pair p. p.second is true if and only if @@ -502,60 +494,58 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                    • -
                                                                                                                                    • +
                                                                                                                                    • Complexity: O(I(n)).
                                                                                                                                    • -
                                                                                                                                    • +
                                                                                                                                    • Exception safety: Strong.

                                                                                                                                    -
                                                                                                                                    -iterator insert(iterator position, const value_type & x);
                                                                                                                                    +
                                                                                                                                    iterator insert(iterator position, const value_type & x);
                                                                                                                                     
                                                                                                                                    -
                                                                                                                                      -
                                                                                                                                    • +
                                                                                                                                        +
                                                                                                                                      • Requires: position is a valid iterator of the view.
                                                                                                                                      • -
                                                                                                                                      • +
                                                                                                                                      • Effects: position is used as a hint to improve the efficiency of the operation. Inserts x into the bimap to which the view belongs if -
                                                                                                                                          -
                                                                                                                                        • +
                                                                                                                                            +
                                                                                                                                          • the set view is non-unique OR no other element with equivalent key exists,
                                                                                                                                          • -
                                                                                                                                          • +
                                                                                                                                          • AND insertion is allowed by all other views of the bimap.
                                                                                                                                        • -
                                                                                                                                        • +
                                                                                                                                        • Returns: On successful insertion, an iterator to the newly inserted element. Otherwise, an iterator to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                        • -
                                                                                                                                        • +
                                                                                                                                        • Complexity: O(H(n)).
                                                                                                                                        • -
                                                                                                                                        • +
                                                                                                                                        • Exception safety: Strong.

                                                                                                                                        -
                                                                                                                                        -template< class InputIterator >
                                                                                                                                        +
                                                                                                                                        template< class InputIterator >
                                                                                                                                         void insert(InputIterator first, InputIterator last);
                                                                                                                                         
                                                                                                                                        -
                                                                                                                                          -
                                                                                                                                        • +
                                                                                                                                            +
                                                                                                                                          • Requires: InputIterator is a model of Input Iterator over elements of type value_type @@ -565,7 +555,7 @@ to which this index belongs. last is reachable from first.
                                                                                                                                          • -
                                                                                                                                          • +
                                                                                                                                          • Effects: iterator hint = end(); @@ -577,129 +567,125 @@ hint, *first++ );
                                                                                                                                          • -
                                                                                                                                          • +
                                                                                                                                          • Complexity: O(m*H(n+m)), where m is the number of elements in [first, last).
                                                                                                                                          • -
                                                                                                                                          • +
                                                                                                                                          • Exception safety: Basic.

                                                                                                                                          -
                                                                                                                                          -iterator erase(iterator position);
                                                                                                                                          +
                                                                                                                                          iterator erase(iterator position);
                                                                                                                                           
                                                                                                                                          -
                                                                                                                                            -
                                                                                                                                          • +
                                                                                                                                              +
                                                                                                                                            • Requires: position is a valid dereferenceable iterator if the set view.
                                                                                                                                            • -
                                                                                                                                            • +
                                                                                                                                            • Effects: Deletes the element pointed to by position.
                                                                                                                                            • -
                                                                                                                                            • +
                                                                                                                                            • Returns: An iterator pointing to the element immediately following the one that was deleted, or end() if no such element exists.
                                                                                                                                            • -
                                                                                                                                            • +
                                                                                                                                            • Complexity: O(D(n)).
                                                                                                                                            • -
                                                                                                                                            • +
                                                                                                                                            • Exception safety: nothrow.

                                                                                                                                            -
                                                                                                                                            -template< class CompatibleKey >
                                                                                                                                            +
                                                                                                                                            template< class CompatibleKey >
                                                                                                                                             size_type erase(const CompatibleKey & x);
                                                                                                                                             
                                                                                                                                            -
                                                                                                                                              -
                                                                                                                                            • +
                                                                                                                                                +
                                                                                                                                              • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                              • -
                                                                                                                                              • +
                                                                                                                                              • Effects: Deletes the elements with key equivalent to x.
                                                                                                                                              • -
                                                                                                                                              • +
                                                                                                                                              • Returns: Number of elements deleted.
                                                                                                                                              • -
                                                                                                                                              • +
                                                                                                                                              • Complexity: O(log(n) + m*D(n)), where m is the number of elements deleted.
                                                                                                                                              • -
                                                                                                                                              • +
                                                                                                                                              • Exception safety: Basic.

                                                                                                                                              -
                                                                                                                                              -iterator erase(iterator first, iterator last);
                                                                                                                                              +
                                                                                                                                              iterator erase(iterator first, iterator last);
                                                                                                                                               
                                                                                                                                              -
                                                                                                                                                -
                                                                                                                                              • +
                                                                                                                                                  +
                                                                                                                                                • Requires: [first,last) is a valid range of the view.
                                                                                                                                                • -
                                                                                                                                                • +
                                                                                                                                                • Effects: Deletes the elements in [first,last).
                                                                                                                                                • -
                                                                                                                                                • +
                                                                                                                                                • Returns: last.
                                                                                                                                                • -
                                                                                                                                                • +
                                                                                                                                                • Complexity: O(log(n) + m*D(n)), where m is the number of elements in [first,last).
                                                                                                                                                • -
                                                                                                                                                • +
                                                                                                                                                • Exception safety: nothrow.

                                                                                                                                                -
                                                                                                                                                -bool replace(iterator position, const value_type& x);
                                                                                                                                                +
                                                                                                                                                bool replace(iterator position, const value_type& x);
                                                                                                                                                 
                                                                                                                                                -
                                                                                                                                                  -
                                                                                                                                                • +
                                                                                                                                                    +
                                                                                                                                                  • Requires: position is a valid dereferenceable iterator of the set view.
                                                                                                                                                  • -
                                                                                                                                                  • +
                                                                                                                                                  • Effects: Assigns the value x to the element pointed to by position into the bimap - to which the set view belongs if, for the value x
                                                                                                                                                      -
                                                                                                                                                    • + to which the set view belongs if, for the value x
                                                                                                                                                        +
                                                                                                                                                      • the set view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                      • -
                                                                                                                                                      • +
                                                                                                                                                      • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                    • -
                                                                                                                                                    • +
                                                                                                                                                    • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                    • -
                                                                                                                                                    • +
                                                                                                                                                    • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                    • -
                                                                                                                                                    • +
                                                                                                                                                    • Complexity: O(R(n)).
                                                                                                                                                    • -
                                                                                                                                                    • +
                                                                                                                                                    • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -707,46 +693,45 @@

                                                                                                                                                    -
                                                                                                                                                    -template< class CompatibleKey >
                                                                                                                                                    +
                                                                                                                                                    template< class CompatibleKey >
                                                                                                                                                     bool replace_key(iterator position, const CompatibleKey & x);
                                                                                                                                                     
                                                                                                                                                    -
                                                                                                                                                      -
                                                                                                                                                    • +
                                                                                                                                                        +
                                                                                                                                                      • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to key_type.
                                                                                                                                                      • -
                                                                                                                                                      • +
                                                                                                                                                      • Effects: Assigns the value x to e.first, where e is the element pointed to by position into the bimap to which the set view belongs if, -
                                                                                                                                                          -
                                                                                                                                                        • +
                                                                                                                                                            +
                                                                                                                                                          • the map view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                          • -
                                                                                                                                                          • +
                                                                                                                                                          • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                        • -
                                                                                                                                                        • +
                                                                                                                                                        • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                        • -
                                                                                                                                                        • +
                                                                                                                                                        • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                        • -
                                                                                                                                                        • +
                                                                                                                                                        • Complexity: O(R(n)).
                                                                                                                                                        • -
                                                                                                                                                        • +
                                                                                                                                                        • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -754,46 +739,45 @@

                                                                                                                                                        -
                                                                                                                                                        -template< class CompatibleData >
                                                                                                                                                        +
                                                                                                                                                        template< class CompatibleData >
                                                                                                                                                         bool replace_data(iterator position, const CompatibleData & x);
                                                                                                                                                         
                                                                                                                                                        -
                                                                                                                                                          -
                                                                                                                                                        • +
                                                                                                                                                            +
                                                                                                                                                          • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to data_type.
                                                                                                                                                          • -
                                                                                                                                                          • +
                                                                                                                                                          • Effects: Assigns the value x to e.second, where e is the element pointed to by position into the bimap to which the set view belongs if, -
                                                                                                                                                              -
                                                                                                                                                            • +
                                                                                                                                                                +
                                                                                                                                                              • the map view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                              • -
                                                                                                                                                              • +
                                                                                                                                                              • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                            • -
                                                                                                                                                            • +
                                                                                                                                                            • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                            • -
                                                                                                                                                            • +
                                                                                                                                                            • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                            • -
                                                                                                                                                            • +
                                                                                                                                                            • Complexity: O(R(n)).
                                                                                                                                                            • -
                                                                                                                                                            • +
                                                                                                                                                            • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -801,106 +785,104 @@

                                                                                                                                                            -
                                                                                                                                                            -template< class KeyModifier >
                                                                                                                                                            +
                                                                                                                                                            template< class KeyModifier >
                                                                                                                                                             bool modify_key(iterator position, KeyModifier mod);
                                                                                                                                                             
                                                                                                                                                            -
                                                                                                                                                              -
                                                                                                                                                            • +
                                                                                                                                                                +
                                                                                                                                                              • Requires: KeyModifier is a model of Unary Function accepting arguments of type: key_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                              • -
                                                                                                                                                              • +
                                                                                                                                                              • Effects: Calls mod(e.first) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. Rearrangement is successful if -
                                                                                                                                                                  -
                                                                                                                                                                • +
                                                                                                                                                                    +
                                                                                                                                                                  • the map view is non-unique OR no other element with equivalent key exists,
                                                                                                                                                                  • -
                                                                                                                                                                  • +
                                                                                                                                                                  • AND rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                • -
                                                                                                                                                                • +
                                                                                                                                                                • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                • -
                                                                                                                                                                • +
                                                                                                                                                                • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                • -
                                                                                                                                                                • +
                                                                                                                                                                • Complexity: O(M(n)).
                                                                                                                                                                • -
                                                                                                                                                                • +
                                                                                                                                                                • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                • -
                                                                                                                                                                • +
                                                                                                                                                                • Note: Only provided for map views.

                                                                                                                                                                -
                                                                                                                                                                -template< class DataModifier >
                                                                                                                                                                +
                                                                                                                                                                template< class DataModifier >
                                                                                                                                                                 bool modify_data(iterator position, DataModifier mod);
                                                                                                                                                                 
                                                                                                                                                                -
                                                                                                                                                                  -
                                                                                                                                                                • +
                                                                                                                                                                    +
                                                                                                                                                                  • Requires: DataModifier is a model of Unary Function accepting arguments of type: data_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                                  • -
                                                                                                                                                                  • +
                                                                                                                                                                  • Effects: Calls mod(e.second) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. Rearrangement is successful if -
                                                                                                                                                                      -
                                                                                                                                                                    • +
                                                                                                                                                                        +
                                                                                                                                                                      • the oppositte map view is non-unique OR no other element with equivalent key in that view exists,
                                                                                                                                                                      • -
                                                                                                                                                                      • +
                                                                                                                                                                      • AND rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Complexity: O(M(n)).
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Note: Only provided for map views.
                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  Set operations @@ -926,99 +908,94 @@

                                                                                                                                                                  -
                                                                                                                                                                  -template< class CompatibleKey >
                                                                                                                                                                  +
                                                                                                                                                                  template< class CompatibleKey >
                                                                                                                                                                   iterator find(const CompatibleKey & x);
                                                                                                                                                                   
                                                                                                                                                                   template< class CompatibleKey >
                                                                                                                                                                   const_iterator find(const CompatibleKey & x) const;
                                                                                                                                                                   
                                                                                                                                                                  -
                                                                                                                                                                    -
                                                                                                                                                                  • +
                                                                                                                                                                      +
                                                                                                                                                                    • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Effects: Returns a pointer to an element whose key is equivalent to x, or end() if such an element does not exist.
                                                                                                                                                                    • -
                                                                                                                                                                    • +
                                                                                                                                                                    • Complexity: O(log(n)).

                                                                                                                                                                    -
                                                                                                                                                                    -template< class CompatibleKey >
                                                                                                                                                                    +
                                                                                                                                                                    template< class CompatibleKey >
                                                                                                                                                                     size_type count(const key_type & x) const;
                                                                                                                                                                     
                                                                                                                                                                    -
                                                                                                                                                                      -
                                                                                                                                                                    • +
                                                                                                                                                                        +
                                                                                                                                                                      • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                      • -
                                                                                                                                                                      • +
                                                                                                                                                                      • Effects: Returns the number of elements with key equivalent to x.
                                                                                                                                                                      • -
                                                                                                                                                                      • +
                                                                                                                                                                      • Complexity: O(log(n) + count(x)).

                                                                                                                                                                      -
                                                                                                                                                                      -template< class CompatibleKey >
                                                                                                                                                                      +
                                                                                                                                                                      template< class CompatibleKey >
                                                                                                                                                                       iterator lower_bound(const key_type & x);
                                                                                                                                                                       
                                                                                                                                                                       template< class CompatibleKey >
                                                                                                                                                                       const_iterator lower_bound(const key_type & x) const;
                                                                                                                                                                       
                                                                                                                                                                      -
                                                                                                                                                                        -
                                                                                                                                                                      • +
                                                                                                                                                                          +
                                                                                                                                                                        • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                        • -
                                                                                                                                                                        • +
                                                                                                                                                                        • Effects: Returns an iterator pointing to the first element with key not less than x, or end() if such an element does not exist.
                                                                                                                                                                        • -
                                                                                                                                                                        • +
                                                                                                                                                                        • Complexity: O(log(n)).

                                                                                                                                                                        -
                                                                                                                                                                        -template< class CompatibleKey >
                                                                                                                                                                        +
                                                                                                                                                                        template< class CompatibleKey >
                                                                                                                                                                         iterator upper_bound(const key_type & x);
                                                                                                                                                                         
                                                                                                                                                                         template< class CompatibleKey >
                                                                                                                                                                         const_iterator upper_bound(const key_type & x) const;
                                                                                                                                                                         
                                                                                                                                                                        -
                                                                                                                                                                          -
                                                                                                                                                                        • +
                                                                                                                                                                            +
                                                                                                                                                                          • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                          • -
                                                                                                                                                                          • +
                                                                                                                                                                          • Effects: Returns an iterator pointing to the first element with key greater than x, or end() if such an element does not exist.
                                                                                                                                                                          • -
                                                                                                                                                                          • +
                                                                                                                                                                          • Complexity: O(log(n)).

                                                                                                                                                                          -
                                                                                                                                                                          -template< class CompatibleKey >
                                                                                                                                                                          +
                                                                                                                                                                          template< class CompatibleKey >
                                                                                                                                                                           std::pair<iterator,iterator>
                                                                                                                                                                               equal_range(const key_type & x);
                                                                                                                                                                           
                                                                                                                                                                          @@ -1026,20 +1003,20 @@
                                                                                                                                                                           std::pair<const_iterator,const_iterator> 
                                                                                                                                                                               equal_range(const key_type & x) const;
                                                                                                                                                                           
                                                                                                                                                                          -
                                                                                                                                                                            -
                                                                                                                                                                          • +
                                                                                                                                                                              +
                                                                                                                                                                            • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                            • -
                                                                                                                                                                            • +
                                                                                                                                                                            • Effects: Equivalent to make_pair(lower_bound(x),upper_bound(x)).
                                                                                                                                                                            • -
                                                                                                                                                                            • +
                                                                                                                                                                            • Complexity: O(log(n)).
                                                                                                                                                                          -
                                                                                                                                                                          +
                                                                                                                                                                          Range operations @@ -1058,12 +1035,12 @@ is said to be a lower bounder of Compare if

                                                                                                                                                                          -
                                                                                                                                                                            -
                                                                                                                                                                          • +
                                                                                                                                                                              +
                                                                                                                                                                            • LowerBounder is a Predicate over Key,
                                                                                                                                                                            • -
                                                                                                                                                                            • +
                                                                                                                                                                            • if lower(k1) and !comp(k2,k1) then lower(k2),
                                                                                                                                                                            • @@ -1075,12 +1052,12 @@ Similarly, an upper bounder is a type UpperBounder such that

                                                                                                                                                                              -
                                                                                                                                                                                -
                                                                                                                                                                              • +
                                                                                                                                                                                  +
                                                                                                                                                                                • UpperBounder is a Predicate over Key,
                                                                                                                                                                                • -
                                                                                                                                                                                • +
                                                                                                                                                                                • if upper(k1) and !comp(k1,k2) then upper(k2),
                                                                                                                                                                                • @@ -1092,65 +1069,63 @@

                                                                                                                                                                                  -
                                                                                                                                                                                  -template< class LowerBounder, class UpperBounder>
                                                                                                                                                                                  +
                                                                                                                                                                                  template< class LowerBounder, class UpperBounder>
                                                                                                                                                                                   std::pair<const_iterator,const_iterator> range(
                                                                                                                                                                                       LowerBounder lower, UpperBounder upper) const;
                                                                                                                                                                                   
                                                                                                                                                                                  -
                                                                                                                                                                                    -
                                                                                                                                                                                  • +
                                                                                                                                                                                      +
                                                                                                                                                                                    • Requires: LowerBounder and UpperBounder are a lower and upper bounder of key_compare, respectively.
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Effects: Returns a pair of iterators pointing to the beginning and one past the end of the subsequence of elements satisfying lower and upper simultaneously. If no such elements exist, the iterators both point to the first element satisfying lower, or else are equal to end() if this latter element does not exist.
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Complexity: O(log(n)).
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Variants: In place of lower or upper (or both), the singular value boost::bimap::unbounded can be provided. This acts as a predicate which all values of type key_type satisfy.
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Note: Only provided for map views.
                                                                                                                                                                                  -
                                                                                                                                                                                  +

                                                                                                                                                                                  -
                                                                                                                                                                                  -template< class CompatibleKey >
                                                                                                                                                                                  +
                                                                                                                                                                                  template< class CompatibleKey >
                                                                                                                                                                                   const data_type & at(const CompatibleKey & k) const;
                                                                                                                                                                                   
                                                                                                                                                                                  -
                                                                                                                                                                                    -
                                                                                                                                                                                  • +
                                                                                                                                                                                      +
                                                                                                                                                                                    • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Effects: Returns the data_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Complexity: O(log(n)).
                                                                                                                                                                                    • -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Note: Only provided when set_of is used.
                                                                                                                                                                                    @@ -1162,82 +1137,79 @@

                                                                                                                                                                                    -
                                                                                                                                                                                    -template< class CompatibleKey >
                                                                                                                                                                                    +
                                                                                                                                                                                    template< class CompatibleKey >
                                                                                                                                                                                     data_type & operator[](const CompatibleKey & k);
                                                                                                                                                                                     
                                                                                                                                                                                    -
                                                                                                                                                                                      -
                                                                                                                                                                                    • +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                      • -
                                                                                                                                                                                      • +
                                                                                                                                                                                      • Effects: return insert(value_type(k,data_type()))->second;
                                                                                                                                                                                      • -
                                                                                                                                                                                      • +
                                                                                                                                                                                      • Complexity: O(log(n)).
                                                                                                                                                                                      • -
                                                                                                                                                                                      • +
                                                                                                                                                                                      • Note: Only provided when set_of is used and the other collection type is mutable.

                                                                                                                                                                                      -
                                                                                                                                                                                      -template< class CompatibleKey >
                                                                                                                                                                                      +
                                                                                                                                                                                      template< class CompatibleKey >
                                                                                                                                                                                       data_type & at(const CompatibleKey & k);
                                                                                                                                                                                       
                                                                                                                                                                                      -
                                                                                                                                                                                        -
                                                                                                                                                                                      • +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                        • -
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Effects: Returns the data_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                        • -
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Complexity: O(log(n)).
                                                                                                                                                                                        • -
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Note: Only provided when set_of is used and the other collection type is mutable.

                                                                                                                                                                                        -
                                                                                                                                                                                        -template< class CompatibleKey >
                                                                                                                                                                                        +
                                                                                                                                                                                        template< class CompatibleKey >
                                                                                                                                                                                         info_type & info_at(const CompatibleKey & k);
                                                                                                                                                                                         
                                                                                                                                                                                         template< class CompatibleKey >
                                                                                                                                                                                         const info_type & info_at(const CompatibleKey & k) const;
                                                                                                                                                                                         
                                                                                                                                                                                        -
                                                                                                                                                                                          -
                                                                                                                                                                                        • +
                                                                                                                                                                                            +
                                                                                                                                                                                          • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                          • -
                                                                                                                                                                                          • +
                                                                                                                                                                                          • Effects: Returns the info_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                          • -
                                                                                                                                                                                          • +
                                                                                                                                                                                          • Complexity: O(log(n)).
                                                                                                                                                                                          • -
                                                                                                                                                                                          • +
                                                                                                                                                                                          • Note: Only provided when set_of and info_hook are used
                                                                                                                                                                                        -
                                                                                                                                                                                        +
                                                                                                                                                                                        @@ -1256,7 +1228,7 @@ ar.

                                                                                                                                                                                        -
                                                                                                                                                                                        • +
                                                                                                                                                                                          • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                          @@ -1267,14 +1239,14 @@ archive) ar.

                                                                                                                                                                                        -
                                                                                                                                                                                          -
                                                                                                                                                                                        • +
                                                                                                                                                                                            +
                                                                                                                                                                                          • Requires: In addition to the general requirements, value_comp() must be serialization-compatible with m.get<i>().value_comp(), where i is the position of the ordered view in the container.
                                                                                                                                                                                          • -
                                                                                                                                                                                          • +
                                                                                                                                                                                          • Postconditions: On successful loading, each of the elements of [begin(), end()) @@ -1290,7 +1262,7 @@ an output archive (XML archive) ar.

                                                                                                                                                                                          -
                                                                                                                                                                                          • +
                                                                                                                                                                                            • Requires: it is a valid iterator of the view. The associated bimap has been previously saved. @@ -1303,14 +1275,14 @@ ( XML archive) ar.

                                                                                                                                                                                            -
                                                                                                                                                                                              -
                                                                                                                                                                                            • +
                                                                                                                                                                                                +
                                                                                                                                                                                              • Postconditions: On successful loading, if it was dereferenceable then *it' is the restored copy of *it, otherwise it' == end().
                                                                                                                                                                                              • -
                                                                                                                                                                                              • +
                                                                                                                                                                                              • Note: It is allowed that it be a const_iterator and the restored it' an diff --git a/doc/html/boost_bimap/reference/unconstrained_set_of_reference.html b/doc/html/boost_bimap/reference/unconstrained_set_of_reference.html index a2c014f..98bd849 100644 --- a/doc/html/boost_bimap/reference/unconstrained_set_of_reference.html +++ b/doc/html/boost_bimap/reference/unconstrained_set_of_reference.html @@ -3,8 +3,8 @@ unconstrained_set_of Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                PrevUpHomeNext
                                                                                                                                                                                                -
                                                                                                                                                                                                +
                                                                                                                                                                                                -
                                                                                                                                                                                                +
                                                                                                                                                                                                -
                                                                                                                                                                                                -namespace boost {
                                                                                                                                                                                                +
                                                                                                                                                                                                namespace boost {
                                                                                                                                                                                                 namespace bimaps {
                                                                                                                                                                                                 
                                                                                                                                                                                                 
                                                                                                                                                                                                @@ -58,7 +57,7 @@
                                                                                                                                                                                                 } // namespace boost
                                                                                                                                                                                                 
                                                                                                                                                                                                -
                                                                                                                                                                                                +

                                                                                                                                                                                                unconstrained_set_of Views @@ -73,8 +72,7 @@ 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 boost {
                                                                                                                                                                                                 namespace bimaps {
                                                                                                                                                                                                 namespace views {
                                                                                                                                                                                                 
                                                                                                                                                                                                @@ -94,15 +92,13 @@
                                                                                                                                                                                                 

                                                                                                                                                                                                In the set view:

                                                                                                                                                                                                -
                                                                                                                                                                                                -typedef signature-compatible with relation< Left, ... > key_type;
                                                                                                                                                                                                +
                                                                                                                                                                                                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  Left  key_type;
                                                                                                                                                                                                 typedef  ...   data_type;
                                                                                                                                                                                                 
                                                                                                                                                                                                 typedef signature-compatible with std::pair< Left, ... > value_type;
                                                                                                                                                                                                @@ -110,15 +106,14 @@
                                                                                                                                                                                                 

                                                                                                                                                                                                In the right map view:

                                                                                                                                                                                                -
                                                                                                                                                                                                -typedef  ...  key_type;
                                                                                                                                                                                                +
                                                                                                                                                                                                typedef  ...  key_type;
                                                                                                                                                                                                 typedef  Left data_type;
                                                                                                                                                                                                 
                                                                                                                                                                                                 typedef signature-compatible with std::pair< ... , Left > value_type;
                                                                                                                                                                                                 

                                                                                                                                                                                                -
                                                                                                                                                                                                +
                                                                                                                                                                                                Complexity signature @@ -129,28 +124,28 @@ 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:

                                                                                                                                                                                                -
                                                                                                                                                                                                  -
                                                                                                                                                                                                • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • copying: c(n) = 0
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • insertion: i(n) = 0
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • hinted insertion: h(n) = 0
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • deletion: d(n) = 0
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • replacement: r(n) = 0
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • modifying: m(n) = 0
                                                                                                                                                                                                -
                                                                                                                                                                                                +
                                                                                                                                                                                                @@ -169,7 +164,7 @@ ar.

                                                                                                                                                                                                -
                                                                                                                                                                                                • +
                                                                                                                                                                                                  • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                                  @@ -180,7 +175,7 @@ archive) ar.

                                                                                                                                                                                                -
                                                                                                                                                                                                • +
                                                                                                                                                                                                  • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                                  diff --git a/doc/html/boost_bimap/reference/unordered_set_of_reference.html b/doc/html/boost_bimap/reference/unordered_set_of_reference.html index 80a35e9..a197957 100644 --- a/doc/html/boost_bimap/reference/unordered_set_of_reference.html +++ b/doc/html/boost_bimap/reference/unordered_set_of_reference.html @@ -3,8 +3,8 @@ unordered_set_of Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                  PrevUpHomeNext
                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -namespace boost {
                                                                                                                                                                                                  +
                                                                                                                                                                                                  namespace boost {
                                                                                                                                                                                                   namespace bimaps {
                                                                                                                                                                                                   
                                                                                                                                                                                                   
                                                                                                                                                                                                  @@ -85,13 +84,12 @@
                                                                                                                                                                                                   } // namespace boost
                                                                                                                                                                                                   
                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -namespace boost {
                                                                                                                                                                                                  +
                                                                                                                                                                                                  namespace boost {
                                                                                                                                                                                                   namespace bimaps {
                                                                                                                                                                                                   
                                                                                                                                                                                                   
                                                                                                                                                                                                  @@ -116,7 +114,7 @@
                                                                                                                                                                                                   } // namespace boost
                                                                                                                                                                                                   
                                                                                                                                                                                                  -
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Collection type specifiers unordered_set_of and unordered_multiset_of @@ -127,7 +125,7 @@ coincide, thus we describe them in a grouped manner.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +

                                                                                                                                                                                                  unordered_[multi]set_of Views @@ -184,8 +182,7 @@ in the concepts modeled or do not exactly conform to the requirements for unordered associative containers.

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -namespace boost {
                                                                                                                                                                                                  +
                                                                                                                                                                                                  namespace boost {
                                                                                                                                                                                                   namespace bimap {
                                                                                                                                                                                                   namespace views {
                                                                                                                                                                                                   
                                                                                                                                                                                                  @@ -364,15 +361,13 @@
                                                                                                                                                                                                   

                                                                                                                                                                                                  In the set view:

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -typedef signature-compatible with relation<       Left, ... > key_type;
                                                                                                                                                                                                  +
                                                                                                                                                                                                  typedef signature-compatible with relation<       Left, ... > key_type;
                                                                                                                                                                                                   typedef signature-compatible with relation< const Left, ... > value_type;
                                                                                                                                                                                                   

                                                                                                                                                                                                  In the left map view:

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -typedef  Left  key_type;
                                                                                                                                                                                                  +
                                                                                                                                                                                                  typedef  Left  key_type;
                                                                                                                                                                                                   typedef  ...   data_type;
                                                                                                                                                                                                   
                                                                                                                                                                                                   typedef signature-compatible with std::pair< const Left, ... > value_type;
                                                                                                                                                                                                  @@ -380,15 +375,14 @@
                                                                                                                                                                                                   

                                                                                                                                                                                                  In the right map view:

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -typedef  ...  key_type;
                                                                                                                                                                                                  +
                                                                                                                                                                                                  typedef  ...  key_type;
                                                                                                                                                                                                   typedef  Left data_type;
                                                                                                                                                                                                   
                                                                                                                                                                                                   typedef signature-compatible with std::pair< ... ,const Left > value_type;
                                                                                                                                                                                                   

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Complexity signature @@ -399,39 +393,39 @@ signature section. The complexity signature of unordered_[multi]set_of view is:

                                                                                                                                                                                                  -
                                                                                                                                                                                                    -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • copying: c(n) = n * log(n),
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • insertion: average case i(n) = 1 (constant), worst case i(n) = n,
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • hinted insertion: average case h(n) = 1 (constant), worst case h(n) = n,
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • deletion: average case d(n) = 1 (constant), worst case d(n) = n,
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • replacement: -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • if the new element key is equivalent to the original, r(n) = 1 (constant),
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • otherwise, average case r(n) = 1 (constant), worst case r(n) = n,
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • modifying: average case m(n) = 1 (constant), worst case m(n) = n.
                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Instantiation types @@ -442,18 +436,18 @@ means of the collection type specifiers and the bimap itself. Instantiations are dependent on the following types:

                                                                                                                                                                                                    -
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • +
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • Value from bimap,
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Allocator from bimap,
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Hash from the collection type specifier,
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Pred from the collection type specifier.
                                                                                                                                                                                                      • @@ -468,13 +462,12 @@ same value for keys equivalent under Pred.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      +
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -iterator
                                                                                                                                                                                                      +
                                                                                                                                                                                                      iterator
                                                                                                                                                                                                       const_iterator
                                                                                                                                                                                                       local_iterator
                                                                                                                                                                                                       const_local_iterator
                                                                                                                                                                                                      @@ -490,7 +483,7 @@
                                                                                                                                                                                                                   

                                                                                                                                                                                                      -
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Constructors, copy and assignment @@ -501,47 +494,45 @@ max_load_factor() is 1.0.

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -this_type & operator=(const this_type & x);
                                                                                                                                                                                                      +
                                                                                                                                                                                                      this_type & operator=(const this_type & x);
                                                                                                                                                                                                       
                                                                                                                                                                                                      -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • Effects: a = b; where a and b are the bimap objects to which *this and x belong, respectively.
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • Returns: *this.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      +

                                                                                                                                                                                                      -
                                                                                                                                                                                                      -std::pair<iterator,bool> insert(const value_type & x);
                                                                                                                                                                                                      +
                                                                                                                                                                                                      std::pair<iterator,bool> insert(const value_type & x);
                                                                                                                                                                                                       
                                                                                                                                                                                                      -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • Effects: Inserts x into the bimap to which the view belongs if -
                                                                                                                                                                                                            -
                                                                                                                                                                                                          • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • the view is non-unique OR no other element with equivalent key exists,
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • AND insertion is allowed by all other views of the bimap.
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • Returns: The return value is a pair p. p.second is true if and only if @@ -550,60 +541,58 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • Complexity: O(I(n)).
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • Exception safety: Strong.

                                                                                                                                                                                                          -
                                                                                                                                                                                                          -iterator insert(iterator position, const value_type & x);
                                                                                                                                                                                                          +
                                                                                                                                                                                                          iterator insert(iterator position, const value_type & x);
                                                                                                                                                                                                           
                                                                                                                                                                                                          -
                                                                                                                                                                                                            -
                                                                                                                                                                                                          • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • Requires: position is a valid iterator of the view.
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • Effects: position is used as a hint to improve the efficiency of the operation. Inserts x into the bimap to which the view belongs if -
                                                                                                                                                                                                                -
                                                                                                                                                                                                              • +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • the view is non-unique OR no other element with equivalent key exists,
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • AND insertion is allowed by all other views of the bimap.
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • Returns: On successful insertion, an iterator to the newly inserted element. Otherwise, an iterator to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • Complexity: O(H(n)).
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • Exception safety: Strong.

                                                                                                                                                                                                              -
                                                                                                                                                                                                              -template< class InputIterator>
                                                                                                                                                                                                              +
                                                                                                                                                                                                              template< class InputIterator>
                                                                                                                                                                                                               void insert(InputIterator first, InputIterator last);
                                                                                                                                                                                                               
                                                                                                                                                                                                              -
                                                                                                                                                                                                                -
                                                                                                                                                                                                              • +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • Requires: InputIterator is a model of Input Iterator over elements of type value_type. @@ -612,7 +601,7 @@ this view belongs. last is reachable from first.
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Effects: iterator hint = end();while(first != @@ -620,129 +609,125 @@ hint = insert(hint, *first++);
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Complexity: O(m*H(n+m)), where m is the number of elements in [first, last).
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Exception safety: Basic.

                                                                                                                                                                                                                -
                                                                                                                                                                                                                -iterator erase(iterator position);
                                                                                                                                                                                                                +
                                                                                                                                                                                                                iterator erase(iterator position);
                                                                                                                                                                                                                 
                                                                                                                                                                                                                -
                                                                                                                                                                                                                  -
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Requires: position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • Effects: Deletes the element pointed to by position.
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • Returns: An iterator pointing to the element immediately following the one that was deleted, or end() if no such element exists.
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • Complexity: O(D(n)).
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • Exception safety: nothrow.

                                                                                                                                                                                                                  -
                                                                                                                                                                                                                  -template< class CompatibleKey >
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  template< class CompatibleKey >
                                                                                                                                                                                                                   size_type erase(const CompatibleKey & x);
                                                                                                                                                                                                                   
                                                                                                                                                                                                                  -
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • Effects: Deletes the elements with key equivalent to x.
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • Returns: Number of elements deleted.
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • Complexity: Average case, O(1 + m*D(n)), worst case O(n + m*D(n)), where m is the number of elements deleted.
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • Exception safety: Basic.

                                                                                                                                                                                                                    -
                                                                                                                                                                                                                    -iterator erase(iterator first, iterator last);
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    iterator erase(iterator first, iterator last);
                                                                                                                                                                                                                     
                                                                                                                                                                                                                    -
                                                                                                                                                                                                                      -
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • Requires: [first,last) is a valid range of the view.
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Effects: Deletes the elements in [first,last).
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Returns: last.
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Complexity: O(m*D(n)), where m is the number of elements in [first,last).
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Exception safety: nothrow.

                                                                                                                                                                                                                      -
                                                                                                                                                                                                                      -bool replace(iterator position, const value_type & x);
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      bool replace(iterator position, const value_type & x);
                                                                                                                                                                                                                       
                                                                                                                                                                                                                      -
                                                                                                                                                                                                                        -
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                        • Requires: position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • Effects: Assigns the value x to the element pointed to by position into the bimap - to which the view belongs if, for the value x
                                                                                                                                                                                                                            -
                                                                                                                                                                                                                          • + to which the view belongs if, for the value x
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • the view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • Complexity: O(R(n)).
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • Exception safety: Strong. If an exception is thrown by some user-provided operation the bimap to which the view belongs remains in its original state. @@ -750,46 +735,45 @@

                                                                                                                                                                                                                          -
                                                                                                                                                                                                                          -template< class CompatibleKey >
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          template< class CompatibleKey >
                                                                                                                                                                                                                           bool replace_key(iterator position, const CompatibleKey & x);
                                                                                                                                                                                                                           
                                                                                                                                                                                                                          -
                                                                                                                                                                                                                            -
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to key_type.
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • Effects: Assigns the value x to e.first, where e is the element pointed to by position into the bimap to which the set view belongs if, -
                                                                                                                                                                                                                                -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • the map view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • Complexity: O(R(n)).
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -797,46 +781,45 @@

                                                                                                                                                                                                                              -
                                                                                                                                                                                                                              -template< class CompatibleData >
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              template< class CompatibleData >
                                                                                                                                                                                                                               bool replace_data(iterator position, const CompatibleData & x);
                                                                                                                                                                                                                               
                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                -
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to data_type.
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • Effects: Assigns the value x to e.second, where e is the element pointed to by position into the bimap to which the set view belongs if, -
                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • the map view is non-unique OR no other element with equivalent key exists (except possibly *position),
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • AND replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • Complexity: O(R(n)).
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -844,106 +827,104 @@

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -template< class KeyModifier >
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  template< class KeyModifier >
                                                                                                                                                                                                                                   bool modify_key(iterator position, KeyModifier mod);
                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • Requires: KeyModifier is a model of Unary Function accepting arguments of type: key_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • Effects: Calls mod(e.first) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. Rearrangement is successful if -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • the map view is non-unique OR no other element with equivalent key exists,
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • AND rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Complexity: O(M(n)).
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Note: Only provided for map views.

                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -template< class DataModifier >
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      template< class DataModifier >
                                                                                                                                                                                                                                       bool modify_data(iterator position, DataModifier mod);
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • Requires: DataModifier is a model of Unary Function accepting arguments of type: data_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • Effects: Calls mod(e.second) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. Rearrangement is successful if -
                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • the oppositte map view is non-unique OR no other element with equivalent key in that view exists,
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • AND rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Complexity: O(M(n)).
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Note: Only provided for map views.
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        @@ -971,45 +952,42 @@

                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                        -template< class CompatibleKey >
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        template< class CompatibleKey >
                                                                                                                                                                                                                                         iterator find(const CompatibleKey & x);
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                         template< class CompatibleKey >
                                                                                                                                                                                                                                         const_iterator find(const CompatibleKey & x) const;
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • Effects: Returns a pointer to an element whose key is equivalent to x, or end() if such an element does not exist.
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • Complexity: Average case O(1) (constant), worst case O(n).

                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                          -template< class CompatibleKey >
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          template< class CompatibleKey >
                                                                                                                                                                                                                                           size_type count(const CompatibleKey & x) const;
                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • Effects: Returns the number of elements with key equivalent to x.
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • Complexity: Average case O(count(x)), worst case O(n).

                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                            -template< class CompatibleKey >
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            template< class CompatibleKey >
                                                                                                                                                                                                                                             std::pair<iterator,iterator>
                                                                                                                                                                                                                                                 equal_range(const CompatibleKey & x);
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                            @@ -1017,45 +995,44 @@
                                                                                                                                                                                                                                             std::pair<const_iterator,const_iterator>
                                                                                                                                                                                                                                                 equal_range(const CompatibleKey & x) const;
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • Effects: Returns a range containing all elements with keys equivalent to x (and only those).
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • Complexity: Average case O(count(x)), worst case O(n).
                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                            -template< class CompatibleKey >
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            template< class CompatibleKey >
                                                                                                                                                                                                                                             const data_type & at(const CompatibleKey & k) const;
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • Effects: Returns the data_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • Complexity: Average case O(1) (constant), worst case O(n).
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • Note: Only provided when unordered_set_of is used.
                                                                                                                                                                                                                                              @@ -1067,113 +1044,109 @@

                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                              -template< class CompatibleKey >
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              template< class CompatibleKey >
                                                                                                                                                                                                                                               data_type & operator[](const CompatibleKey & k);
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • Effects: return insert(value_type(k,data_type()))->second;
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • Complexity: If the insertion is performed O(I(n)), else: Average case O(1) (constant), worst case O(n).
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • Note: Only provided when unordered_set_of is used and the other collection type is mutable.

                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                -template< class CompatibleKey >
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                template< class CompatibleKey >
                                                                                                                                                                                                                                                 data_type & at(const CompatibleKey & k);
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • Effects: Returns the data_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • Complexity: Average case O(1) (constant), worst case O(n).
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • Note: Only provided when unordered_set_of is used and the other collection type is mutable.

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -template< class CompatibleKey >
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  template< class CompatibleKey >
                                                                                                                                                                                                                                                   info_type & info_at(const CompatibleKey & k);
                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                   template< class CompatibleKey >
                                                                                                                                                                                                                                                   const info_type & info_at(const CompatibleKey & k) const;
                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Requires: CompatibleKey is a compatible key of key_compare.
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Effects: Returns the info_type reference that is associated with k, or throws std::out_of_range if such key does not exist.
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Complexity: Average case O(1) (constant), worst case O(n).
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Note: Only provided when unordered_set_of and info_hook are used
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  -void rehash(size_type n);
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  void rehash(size_type n);
                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Effects: Increases if necessary the number of internal buckets so that size()/bucket_count() does not exceed the maximum load factor, and bucket_count()>=n.
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Postconditions: Validity of iterators and references to the elements contained is preserved.
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Complexity: Average case O(size()), worst case O(size(n)2).
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Exception safety: Strong.
                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  @@ -1190,7 +1163,7 @@ ar.

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                    • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                                                                                    @@ -1201,15 +1174,15 @@ archive) ar.

                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • Requires: Additionally to the general requirements, key_eq() must be serialization-compatible with m.get<i>().key_eq(), where i is the position of the unordered_[multi]set_of view in the container.
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Postconditions: On successful loading, the range [begin(), end()) contains restored copies of every element in [m.get<i>().begin(), m.get<i>().end()), though not necessarily in the same @@ -1224,7 +1197,7 @@ (XML archive) ar.

                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      • Requires: it is a valid iterator of the view. The associated bimap @@ -1238,15 +1211,15 @@ from an input archive (XML archive) ar.

                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • Postconditions: On successful loading, if it was dereferenceable then *it' is the restored copy of *it, otherwise it' == end().
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Note: It is allowed that it be a const_iterator and the restored it' an iterator, or viceversa. @@ -1259,7 +1232,7 @@ or const_local_iterator it to an output archive (XML archive) ar.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          • Requires: it is a valid local iterator of the view. The associated bimap has been previously saved.
                                                                                                                                                                                                                                                          @@ -1271,8 +1244,8 @@ (XML archive) ar.

                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • Postconditions: On successful loading, if it was dereferenceable then *it' @@ -1285,7 +1258,7 @@ and i is the ordinal of the index.)
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • Note: It is allowed that it be a const_local_iterator and the restored it' a local_iterator, or diff --git a/doc/html/boost_bimap/reference/vector_of_reference.html b/doc/html/boost_bimap/reference/vector_of_reference.html index f1df941..0909ad1 100644 --- a/doc/html/boost_bimap/reference/vector_of_reference.html +++ b/doc/html/boost_bimap/reference/vector_of_reference.html @@ -3,8 +3,8 @@ vector_of Reference - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                            PrevUpHomeNext
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            vector_of Reference @@ -49,13 +49,12 @@
                                                                                                                                                                                                                                                            Serialization

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            -namespace boost {
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            namespace boost {
                                                                                                                                                                                                                                                             namespace bimaps {
                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                            @@ -69,7 +68,7 @@
                                                                                                                                                                                                                                                             } // namespace boost
                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            vector_of views @@ -108,17 +107,17 @@ As is the case with list_of views, vector_of views have the following limitations with respect to STL sequence containers:

                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • vector_of views are not Assignable (like any other view.)
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • Insertions into a vector_of view may fail due to clashings with other views. This alters the semantics of the operations provided with respect to their analogues in STL sequence containers.
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • Elements in a vector_of view are not mutable, and can only be changed by means of replace and modify member functions.
                                                                                                                                                                                                                                                              • @@ -134,8 +133,7 @@ either not present in the concepts modeled or do not exactly conform to the requirements for these types of containers.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -namespace boost {
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                namespace boost {
                                                                                                                                                                                                                                                                 namespace bimaps {
                                                                                                                                                                                                                                                                 namespace views {
                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                @@ -304,15 +302,13 @@
                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                In the set view:

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -typedef signature-compatible with relation< Left, ... > key_type;
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                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  Left  key_type;
                                                                                                                                                                                                                                                                 typedef  ...   data_type;
                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                 typedef signature-compatible with std::pair< Left, ... > value_type;
                                                                                                                                                                                                                                                                @@ -320,15 +316,14 @@
                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                In the right map view:

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -typedef  ...  key_type;
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                typedef  ...  key_type;
                                                                                                                                                                                                                                                                 typedef  Left data_type;
                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                 typedef signature-compatible with std::pair< ... , Left > value_type;
                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Complexity signature @@ -339,26 +334,26 @@ signature section. The complexity signature of vector_of view is:

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • copying: c(n) = n * log(n),
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • insertion: i(n) = 1 (amortized constant),
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • hinted insertion: h(n) = 1 (amortized constant),
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • deletion: d(n) = m, where m is the distance from the deleted element to the end of the sequence,
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • replacement: r(n) = 1 (constant),
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • modifying: m(n) = 1 (constant).
                                                                                                                                                                                                                                                                  @@ -380,7 +375,7 @@ and relocate, respectively.)

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Instantiation types @@ -391,16 +386,16 @@ specified by means of the collection type specifiers and the bimap itself. Instantiations are dependent on the following types:

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • Value from vector_of,
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • Allocator from bimap,
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Constructors, copy and assignment @@ -409,26 +404,24 @@ As explained in the views concepts section, views do not have public constructors or destructors. Assignment, on the other hand, is provided.

                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                -this_type & operator=(const this_type & x);
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                this_type & operator=(const this_type & x);
                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • Effects: a=b; where a and b are the bimap objects to which *this and x belong, respectively.
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • Returns: *this.

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -template< class InputIterator >
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  template< class InputIterator >
                                                                                                                                                                                                                                                                   void assign(InputIterator first, InputIterator last);
                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • Requires: InputIterator is a model of Input Iterator over elements of type value_type @@ -438,16 +431,15 @@ this view belongs. last is reachable from first.
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • Effects: clear(); insert(end(),first,last);

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -void assign(size_type n, const value_type & value);
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    void assign(size_type n, const value_type & value);
                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      • Effects: clear(); for(size_type i = 0; @@ -456,18 +448,17 @@ ++n) push_back(v);
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                    -size_type capacity() const;
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    size_type capacity() const;
                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • Returns: The total number of elements c such that, when size() @@ -475,7 +466,7 @@ back insertions happen in constant time (the general case as described by i(n) is amortized constant time.)
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • Note: Validity of iterators and references to elements is preserved in all insertions, regardless of the capacity status. @@ -483,60 +474,57 @@

                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                      -void reserve(size_type m);
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      void reserve(size_type m);
                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • Effects: If the previous value of capacity() was greater than or equal to m, nothing is done; otherwise, the internal capacity is changed so that capacity()>=m.
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • Complexity: If the capacity is not changed, constant; otherwise O(n).
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • Exception safety: If the capacity is not changed, nothrow; otherwise, strong.

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -void resize(size_type n, const value_type & x = value_type());
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        void resize(size_type n, const value_type & x = value_type());
                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Effects: if( n > size() ) insert(end(), n-size(), x);else if( n<size() ) erase(begin()+n,end());
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • Note: If an expansion is requested, the size of the view is not guaranteed to be n after this operation (other views may ban insertions.)
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                        -std::pair<iterator,bool> push_front(const value_type & x);
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        std::pair<iterator,bool> push_front(const value_type & x);
                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Effects: Inserts x at the beginning of the sequence if no other view of the bimap bans the insertion.
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • Returns: The return value is a pair p. p.second is true if and only if @@ -545,26 +533,25 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • Complexity: O(n+I(n)).
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • Exception safety: Strong.

                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                          -std::pair<iterator,bool> push_back(const value_type & x);
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          std::pair<iterator,bool> push_back(const value_type & x);
                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • Effects: Inserts x at the end of the sequence if no other view of the bimap bans the insertion.
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • Returns: The return value is a pair p. p.second is true if and only if @@ -573,30 +560,29 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • Complexity: O(I(n)).
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • Exception safety: Strong.

                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                            -std::pair<iterator,bool> insert(iterator position, const value_type & x);
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            std::pair<iterator,bool> insert(iterator position, const value_type & x);
                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • Requires: position is a valid iterator of the view.
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • Effects: Inserts x before position if insertion is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • Returns: The return value is a pair p. p.second is true if and only if @@ -605,25 +591,24 @@ points to an element that caused the insertion to be banned. Note that more than one element can be causing insertion not to be allowed.
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • Complexity: O(shl(end()-position,1) + I(n)).
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • Exception safety: Strong.

                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                              -void insert(iterator position, size_type m, const value_type & x);
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              void insert(iterator position, size_type m, const value_type & x);
                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                • Requires: position is a valid iterator of the view.
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • Effects: for(size_type i = 0; @@ -631,19 +616,18 @@ m; ++i) insert(position, x);
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • Complexity: O(shl(end()-position,m) + m*I(n+m)).

                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                -template< class InputIterator >
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                template< class InputIterator >
                                                                                                                                                                                                                                                                                 void insert(iterator position, InputIterator first, InputIterator last);
                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                • +

                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                  -iterator erase(iterator position);
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  iterator erase(iterator position);
                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • Requires: position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • Effects: Deletes the element pointed to by position.
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • Returns: An iterator pointing to the element immediately following the one that was deleted, or end() if no such element exists.
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • Complexity: O(D(n)).
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • Exception safety: nothrow.

                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                    -iterator erase(iterator first, iterator last);
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    iterator erase(iterator first, iterator last);
                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Requires: [first,last) is a valid range of the view.
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Effects: Deletes the elements in [first,last).
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Returns: last.
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Complexity: O(m*D(n)), where m is the number of elements in [first,last).
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Exception safety: nothrow.

                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                      -bool replace(iterator position, const value_type & x);
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      bool replace(iterator position, const value_type & x);
                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Requires: position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Effects: Assigns the value x to the element pointed to by position into the bimap to which the view belongs if replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Complexity: O(R(n)).
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Exception safety: Strong. If an exception is thrown by some user-provided operation the bimap to which the view belongs remains in its original state. @@ -755,17 +736,16 @@

                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                        -template< class CompatibleKey >
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        template< class CompatibleKey >
                                                                                                                                                                                                                                                                                         bool replace_key(iterator position, const CompatibleKey & x);
                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to key_type.
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Effects: Assigns the value x to e.first, where e is the element pointed to by position @@ -773,20 +753,20 @@ the set view belongs if replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Complexity: O(R(n)).
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -794,17 +774,16 @@

                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                          -template< class CompatibleData >
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          template< class CompatibleData >
                                                                                                                                                                                                                                                                                           bool replace_data(iterator position, const CompatibleData & x);
                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Requires: position is a valid dereferenceable iterator of the set view. CompatibleKey can be assigned to data_type.
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Effects: Assigns the value x to e.second, where e is the element pointed to by position @@ -812,20 +791,20 @@ the set view belongs if replacing is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Postconditions: Validity of position is preserved in all cases.
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Returns: true if the replacement took place, false otherwise.
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Complexity: O(R(n)).
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Exception safety: Strong. If an exception is thrown by some user-provided operation, the bimap to which the set view belongs remains in its original state. @@ -833,90 +812,88 @@

                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                            -template< class KeyModifier >
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            template< class KeyModifier >
                                                                                                                                                                                                                                                                                             bool modify_key(iterator position, KeyModifier mod);
                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Requires: KeyModifier is a model of Unary Function accepting arguments of type: key_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Effects: Calls mod(e.first) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. It is successful if the rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Complexity: O(M(n)).
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Note: Only provided for map views.

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -template< class DataModifier >
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              template< class DataModifier >
                                                                                                                                                                                                                                                                                               bool modify_data(iterator position, DataModifier mod);
                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • Requires: DataModifier is a model of Unary Function accepting arguments of type: data_type&; position is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Effects: Calls mod(e.second) where e is the element pointed to by position and rearranges *position into all the views of the bimap. If the rearrangement fails, the element is erased. It is successful if the rearrangement is allowed by all other views of the bimap.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Postconditions: Validity of position is preserved if the operation succeeds.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Returns: true if the operation succeeded, false otherwise.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Complexity: O(M(n)).
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Exception safety: Basic. If an exception is thrown by some user-provided operation (except possibly mod), then the element pointed to by position is erased.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Note: Only provided for map views.
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              List operations @@ -930,40 +907,38 @@

                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                              -void splice(iterator position, this_type & x);
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              void splice(iterator position, this_type & x);
                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • Requires: position is a valid iterator of the view. &x!=this.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Effects: Inserts the contents of x before position, in the same order as they were in x. Those elements successfully inserted are erased from x.
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Complexity: O(shl(end()-position,x.size()) + x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                -void splice(iterator position, this_type & x,iterator i);
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                void splice(iterator position, this_type & x,iterator i);
                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • Requires: position is a valid iterator of the view. i is a valid dereferenceable iterator x.
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Effects: Inserts the element pointed to by i before position: if insertion is successful, the element is erased from x. @@ -971,183 +946,176 @@ and the operation is always successful. If position==i, no operation is performed.
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Postconditions: If &x==this, no iterator or reference is invalidated.
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Complexity: If &x==this, O(rel(position,i,i+1)); otherwise O(shl(end()-position,1) + I(n) + D(n)).
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Exception safety: If &x==this, nothrow; otherwise, strong.

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -void splice(iterator position, this_type & x, iterator first, iterator last);
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  void splice(iterator position, this_type & x, iterator first, iterator last);
                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • Requires: position is a valid iterator of the view. first and last are valid iterators of x. last is reachable from first. position is not in the range [first,last).
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • Effects: For each element in the range [first,last), insertion is tried before position; if the operation is successful, the element is erased from x. In the special case &x==this, no copy or deletion is performed, and insertions are always successful.
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • Postconditions: If &x==this, no iterator or reference is invalidated.
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • Complexity: If &x==this, O(rel(position,first,last)); otherwise O(shl(end()-position,m) + m*I(n+m) + m*D(x.size())) where m is the number of elements in [first,last).
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                    -void remove(const value_type & value);
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    void remove(const value_type & value);
                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • Effects: Erases all elements of the view which compare equal to value.
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                      -template< class Predicate >
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      template< class Predicate >
                                                                                                                                                                                                                                                                                                       void remove_if(Predicate pred);
                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Effects: Erases all elements x of the view for which pred(x) holds.
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                        -void unique();
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        void unique();
                                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                          • Effects: Eliminates all but the first element from every consecutive group of equal elements referred to by the iterator i in the range [first+1,last) for which *i==*(i-1).
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                          -template< class BinaryPredicate >
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          template< class BinaryPredicate >
                                                                                                                                                                                                                                                                                                           void unique(BinaryPredicate binary_pred); 
                                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            • Effects: Eliminates all but the first element from every consecutive group of elements referred to by the iterator i in the range [first+1,last) for which binary_pred(*i, *(i-1)) holds.
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • Complexity: O(n + m*D(n)), where m is the number of elements erased.
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                            -void merge(this_type & x);
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            void merge(this_type & x);
                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                              • Requires: std::less<value_type> is a Strict Weak Ordering over value_type. Both the view and x are sorted according to std::less<value_type>.
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • Effects: Attempts to insert every element of x into the corresponding position of the view (according to the order). Elements successfully inserted are erased from x. The resulting sequence is stable, i.e. equivalent elements of either container preserve their relative position. In the special case &x==this, no operation is performed.
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • Postconditions: Elements in the view and remaining elements in x are sorted. Validity of iterators to the view and of non-erased elements of x references is preserved.
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • Complexity: If &x==this, constant; otherwise O(n + x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                              -template< class Compare >
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              template< class Compare >
                                                                                                                                                                                                                                                                                                               void merge(this_type & x, Compare comp);
                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Requires: Compare is a Strict Weak Ordering over value_type. Both the view and x are sorted according to comp.
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Effects: Attempts to insert every element of x into the corresponding position of the view (according to comp). @@ -1156,99 +1124,96 @@ container preserve their relative position. In the special case &x==this, no operation is performed.
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Postconditions: Elements in the view and remaining elements in x are sorted according to comp. Validity of iterators to the view and of non-erased elements of x references is preserved.
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Complexity: If &x==this, constant; otherwise O(n + x.size()*I(n+x.size()) + x.size()*D(x.size())).
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Exception safety: If &x==this, nothrow; otherwise, basic.

                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                -void sort();
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                void sort();
                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • Requires: std::less<value_type> is a Strict Weak Ordering over value_type.
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Effects: Sorts the view according to std::less<value_type>. The sorting is stable, i.e. equivalent elements preserve their relative position.
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Postconditions: Validity of iterators and references is preserved.
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Complexity: O(n*log(n)).
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                  -template< class Compare >
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  template< class Compare >
                                                                                                                                                                                                                                                                                                                   void sort(Compare comp);
                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                    • Requires: Compare is a Strict Weak Ordering over value_type.
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Effects: Sorts the view according to comp. The sorting is stable, i.e. equivalent elements preserve their relative position.
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Postconditions: Validity of iterators and references is preserved.
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Complexity: O(n*log(n)).
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Exception safety: Basic.

                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                    -void reverse();
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    void reverse();
                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                      • Effects: Reverses the order of the elements in the view.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Postconditions: Validity of iterators and references is preserved.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Complexity: O(n).
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Exception safety: nothrow.
                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Rearrange operations @@ -1260,38 +1225,36 @@

                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                    -void relocate(iterator position, iterator i);
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    void relocate(iterator position, iterator i);
                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                      • Requires: position is a valid iterator of the view. i is a valid dereferenceable iterator of the view.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Effects: Inserts the element pointed to by i before position. If position==i, no operation is performed.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Postconditions: No iterator or reference is invalidated.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Complexity: Constant.
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • Exception safety: nothrow.

                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                      -void relocate(iterator position, iterator first, iterator last);
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      void relocate(iterator position, iterator first, iterator last);
                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                        • Requires: position is a valid iterator of the view. first and last are valid @@ -1300,22 +1263,22 @@ position is not in the range [first,last).
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • Effects: The range of elements [first,last) is repositioned just before position.
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • Postconditions: No iterator or reference is invalidated.
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • Complexity: Constant.
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • Exception safety: nothrow.
                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      @@ -1334,7 +1297,7 @@ ar.

                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                        • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                                                                                                                                                        @@ -1345,12 +1308,12 @@ archive) ar.

                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                        • Requires: No additional requirements to those imposed by the container.
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • Postconditions: On successful loading, each of the elements of [begin(), end()) @@ -1369,7 +1332,7 @@ (XML archive) ar.

                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                          • Requires: it is a valid iterator of the view. The associated bimap has been previously saved. @@ -1382,13 +1345,13 @@ (XML archive) ar.

                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                            • Postconditions: On successful loading, if it was dereferenceable then *it' is the restored copy of *it, otherwise it'==end().
                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                            • Note: It is allowed that it be a const_iterator and the restored it' an diff --git a/doc/html/boost_bimap/release_notes.html b/doc/html/boost_bimap/release_notes.html index e7bcfec..efcca2b 100644 --- a/doc/html/boost_bimap/release_notes.html +++ b/doc/html/boost_bimap/release_notes.html @@ -3,8 +3,8 @@ Release notes - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              diff --git a/doc/html/boost_bimap/test_suite.html b/doc/html/boost_bimap/test_suite.html index 3dad3a8..e5baf8c 100644 --- a/doc/html/boost_bimap/test_suite.html +++ b/doc/html/boost_bimap/test_suite.html @@ -3,8 +3,8 @@ Test suite - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              diff --git a/doc/html/boost_bimap/the_tutorial.html b/doc/html/boost_bimap/the_tutorial.html index 3e0fc64..a17f7a9 100644 --- a/doc/html/boost_bimap/the_tutorial.html +++ b/doc/html/boost_bimap/the_tutorial.html @@ -3,8 +3,8 @@ The tutorial - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                              + -
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                              1. +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                1. Boost.Bimap is intuitive because it is based on the standard template library. New concepts are however presented to extend the standard maps to bidirectional maps. The first step is to gain a firm grasp of the bimap framework. The first section (Discovering the bimap framework) aims to explain this.
                                                                                                                                                                                                                                                                                                                                2. -
                                                                                                                                                                                                                                                                                                                                3. +
                                                                                                                                                                                                                                                                                                                                4. Boost.Bimap offers much more than just a one-to-one ordered unique bidirectional map. It is possible to control the collection type of each side of the relationship that the bimap represents, giving one-to-many containers, @@ -105,38 +105,38 @@ collection types) explains how to instantiate a bimap with different collection constraints.
                                                                                                                                                                                                                                                                                                                                5. -
                                                                                                                                                                                                                                                                                                                                6. +
                                                                                                                                                                                                                                                                                                                                7. The section (The "collection of relations" type) explains how to create new types of bidirectional maps using custom collection types.
                                                                                                                                                                                                                                                                                                                                8. -
                                                                                                                                                                                                                                                                                                                                9. +
                                                                                                                                                                                                                                                                                                                                10. In the section Differences with standard maps we will learn about the subtle differences between a bimap map view and a standard map.
                                                                                                                                                                                                                                                                                                                                11. -
                                                                                                                                                                                                                                                                                                                                12. +
                                                                                                                                                                                                                                                                                                                                13. The section Useful functions provides information about functions of a bimap that are not found in the STL.
                                                                                                                                                                                                                                                                                                                                14. -
                                                                                                                                                                                                                                                                                                                                15. +
                                                                                                                                                                                                                                                                                                                                16. The types of a bimap can be tagged so that each side is accessible by something closer to the problem than left and right. This leads to more readable, self-documenting code. The fourth section (Bimaps with user defined names) shows how to use this feature.
                                                                                                                                                                                                                                                                                                                                17. -
                                                                                                                                                                                                                                                                                                                                18. +
                                                                                                                                                                                                                                                                                                                                19. The bimap mapping framework allows to disable a view of a bimap, including the standard mapping containers as a particular case. The section Unconstrained Sets explains how they work.
                                                                                                                                                                                                                                                                                                                                20. -
                                                                                                                                                                                                                                                                                                                                21. +
                                                                                                                                                                                                                                                                                                                                22. The section Additional information explains how to attach information to each relation of a bimap.
                                                                                                                                                                                                                                                                                                                                23. -
                                                                                                                                                                                                                                                                                                                                24. +
                                                                                                                                                                                                                                                                                                                                25. The final section (Complete Instantiation Scheme) summarizes bimap instantiation and explains how change the allocator type to be used. diff --git a/doc/html/boost_bimap/the_tutorial/additional_information.html b/doc/html/boost_bimap/the_tutorial/additional_information.html index 70cfb4d..fd314bb 100644 --- a/doc/html/boost_bimap/the_tutorial/additional_information.html +++ b/doc/html/boost_bimap/the_tutorial/additional_information.html @@ -3,8 +3,8 @@ Additional information - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                                  PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Additional information @@ -36,8 +36,7 @@

                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                  -typedef bimap<
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  typedef bimap<
                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                       multiset_of< std::string >, // author
                                                                                                                                                                                                                                                                                                                                            set_of< std::string >  // title
                                                                                                                                                                                                                                                                                                                                  @@ -61,12 +60,12 @@
                                                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                                                  Suppose now that we want to store abstract of each book. We have two options:

                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                  1. +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                    1. Books name are unique identifiers, so we can create a separate std::map< string, string > that relates books names with abstracts.
                                                                                                                                                                                                                                                                                                                                    2. -
                                                                                                                                                                                                                                                                                                                                    3. +
                                                                                                                                                                                                                                                                                                                                    4. We can use Boost.MultiIndex for the new beast.
                                                                                                                                                                                                                                                                                                                                    @@ -110,8 +109,7 @@

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -typedef bimap<
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    typedef bimap<
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                         multiset_of< std::string >, // author
                                                                                                                                                                                                                                                                                                                                              set_of< std::string >, // title
                                                                                                                                                                                                                                                                                                                                    @@ -151,8 +149,7 @@
                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -i->info += "More details about this book";
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    i->info += "More details about this book";
                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                    @@ -168,8 +165,7 @@

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -// Print the new abstract
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    // Print the new abstract
                                                                                                                                                                                                                                                                                                                                     std::cout << bm.right.info_at("The C++ Programming Language");
                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                    @@ -185,8 +181,7 @@

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -typedef bimap<
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    typedef bimap<
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                         multiset_of< tagged< std::string, author   > >,
                                                                                                                                                                                                                                                                                                                                              set_of< tagged< std::string, title    > >,
                                                                                                                                                                                                                                                                                                                                    diff --git a/doc/html/boost_bimap/the_tutorial/bimaps_with_user_defined_names.html b/doc/html/boost_bimap/the_tutorial/bimaps_with_user_defined_names.html
                                                                                                                                                                                                                                                                                                                                    index c6014e5..f49f409 100644
                                                                                                                                                                                                                                                                                                                                    --- a/doc/html/boost_bimap/the_tutorial/bimaps_with_user_defined_names.html
                                                                                                                                                                                                                                                                                                                                    +++ b/doc/html/boost_bimap/the_tutorial/bimaps_with_user_defined_names.html
                                                                                                                                                                                                                                                                                                                                    @@ -3,8 +3,8 @@
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     Bimaps with user defined names
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    @@ -14,15 +14,15 @@
                                                                                                                                                                                                                                                                                                                                     Boost C++ Libraries
                                                                                                                                                                                                                                                                                                                                     Home
                                                                                                                                                                                                                                                                                                                                     Libraries
                                                                                                                                                                                                                                                                                                                                    -People
                                                                                                                                                                                                                                                                                                                                    -FAQ
                                                                                                                                                                                                                                                                                                                                    +People
                                                                                                                                                                                                                                                                                                                                    +FAQ
                                                                                                                                                                                                                                                                                                                                     More
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Bimaps with user defined names @@ -39,8 +39,7 @@

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -typedef bimap
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    typedef bimap
                                                                                                                                                                                                                                                                                                                                     <
                                                                                                                                                                                                                                                                                                                                         multiset_of<std::string>,
                                                                                                                                                                                                                                                                                                                                         int
                                                                                                                                                                                                                                                                                                                                    @@ -106,8 +105,7 @@
                                                                                                                                                                                                                                                                                                                                             In order to specify a custom tag, the type of each side has to be tagged.
                                                                                                                                                                                                                                                                                                                                             Tagging a type is very simple:
                                                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -typedef tagged< int, a_tag > tagged_int;
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    typedef tagged< int, a_tag > tagged_int;
                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                    Now we can rewrite the example: @@ -120,8 +118,7 @@

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -struct id   {}; // Tag for the identification number
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    struct id   {}; // Tag for the identification number
                                                                                                                                                                                                                                                                                                                                     struct name {}; // Tag for the name of the person
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     typedef bimap
                                                                                                                                                                                                                                                                                                                                    @@ -168,8 +165,7 @@
                                                                                                                                                                                                                                                                                                                                             Remember that when the bimap has user defined tags you can still use the
                                                                                                                                                                                                                                                                                                                                             untagged version structures.
                                                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -struct Left  {};
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    struct Left  {};
                                                                                                                                                                                                                                                                                                                                     struct Right {};
                                                                                                                                                                                                                                                                                                                                     typedef bimap< 
                                                                                                                                                                                                                                                                                                                                              multiset_of< tagged< int, Left  > >,
                                                                                                                                                                                                                                                                                                                                    @@ -185,7 +181,7 @@
                                                                                                                                                                                                                                                                                                                                     bm_type::right_iterator right_iter = bm.right.begin();
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Table 1.3. Equivalence of expresions using user defined names

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Table 1.3. Equivalence of expresions using user defined names

                                                                                                                                                                                                                                                                                                                                    diff --git a/doc/html/boost_bimap/the_tutorial/complete_instantiation_scheme.html b/doc/html/boost_bimap/the_tutorial/complete_instantiation_scheme.html index 4420906..7bd7d9a 100644 --- a/doc/html/boost_bimap/the_tutorial/complete_instantiation_scheme.html +++ b/doc/html/boost_bimap/the_tutorial/complete_instantiation_scheme.html @@ -3,8 +3,8 @@ Complete instantiation scheme - - + + @@ -14,15 +14,15 @@ - - + +
                                                                                                                                                                                                                                                                                                                                    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

                                                                                                                                                                                                                                                                                                                                    PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Complete instantiation scheme @@ -30,8 +30,7 @@

                                                                                                                                                                                                                                                                                                                                    To summarize, this is the complete instantiation scheme.

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -typedef bimap
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    typedef bimap
                                                                                                                                                                                                                                                                                                                                     <
                                                                                                                                                                                                                                                                                                                                         LeftCollectionType, RightCollectionType
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    @@ -50,62 +49,58 @@
                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                    The possibles way to use the first parameter are:

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -bimap< Type, R >
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    bimap< Type, R >
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                      • Left type: Type
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • Left collection type: set_of< Type >
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • Left tag: member_at::left
                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                      -bimap< {CollectionType}_of< Type >, R >
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      bimap< {CollectionType}_of< Type >, R >
                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                        • Left type: Type
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • Left collection type: {CollectionType}_of< LeftType >
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • Left tag: member_at::left
                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                        -bimap< tagged< Type, Tag >, R >
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        bimap< tagged< Type, Tag >, R >
                                                                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                          • Left type: Type
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • Left collection type: set_of< LeftType >
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • Left tag: Tag
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                          -bimap< {CollectionType}_of< tagged< Type, Tag > >, R >
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          bimap< {CollectionType}_of< tagged< Type, Tag > >, R >
                                                                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                            • Left type: Type
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • Left collection type: {CollectionType}_of< LeftType >
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • Left tag: Tag
                                                                                                                                                                                                                                                                                                                                            @@ -128,112 +123,104 @@ The following are the possible ways of instantiating the last three parameters of a bimap. You can ignore some of the parameter but the order must be respected.

                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                            -bimap< L, R >
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            bimap< L, R >
                                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                              • set_of_relation_type: based on the left key type
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • info: no info
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • allocator: std::allocator
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                              -bimap< L, R ,SetOfRelationType>
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              bimap< L, R ,SetOfRelationType>
                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                • set_of_relation_type: SetOfRelationType
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • info: no info
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • allocator: std::allocator
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                -bimap< L, R , SetOfRelationType, with_info<Info> >
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                bimap< L, R , SetOfRelationType, with_info<Info> >
                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                  • set_of_relation_type: SetOfRelationType
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • info: Info
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • allocator: std::allocator
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                  -bimap< L, R , SetOfRelationType, with_info<Info>, Allocator>
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  bimap< L, R , SetOfRelationType, with_info<Info>, Allocator>
                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                    • set_of_relation_type: SetOfRelationType
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • info: Info
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • allocator: Allocator
                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                    -bimap< L, R , SetOfRelationType, Allocator>
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    bimap< L, R , SetOfRelationType, Allocator>
                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                      • set_of_relation_type: SetOfRelationType
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • info: no info
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • allocator: Allocator
                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                      -bimap< L, R , with_info<Info> >
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      bimap< L, R , with_info<Info> >
                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                        • set_of_relation_type: based on the left key type
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • info: Info
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • allocator: std::allocator
                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                        -bimap< L, R , with_info<Info>, Allocator>
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        bimap< L, R , with_info<Info>, Allocator>
                                                                                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                          • set_of_relation_type: based on the left key type
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • allocator: Allocator
                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                          -bimap< L, R , Allocator>
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          bimap< L, R , Allocator>
                                                                                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                                                          -
                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                            • set_of_relation_type: based on the left key type
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • info: no info
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • allocator: Allocator
                                                                                                                                                                                                                                                                                                                                                            diff --git a/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html b/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html index a755983..15399af 100644 --- a/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html +++ b/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html @@ -3,8 +3,8 @@ Controlling collection types - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                                                            PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Controlling collection types @@ -34,7 +34,7 @@ parameters
                                                                                                                                                                                                                                                                                                                                                            Examples

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Freedom of choice @@ -53,14 +53,13 @@ collection is a set. The instantiation of a bimap with custom collection types looks like this:

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            -typedef bimap< CollectionType_of<A>, CollectionType_of<B> > bm_type;
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            typedef bimap< CollectionType_of<A>, CollectionType_of<B> > bm_type;
                                                                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                                                                            The following is the list of all supported collection types.

                                                                                                                                                                                                                                                                                                                                                            -

                                                                                                                                                                                                                                                                                                                                                            Table 1.2. Collection of Key Types

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Table 1.2. Collection of Key Types

                                                                                                                                                                                                                                                                                                                                                            @@ -221,26 +220,25 @@ you can perform with each side of the bimap and the time it takes to do each. If we have:

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            -typedef bimap< CollectionType_of<A>, CollectionType_of<B> > bm_type;
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            typedef bimap< CollectionType_of<A>, CollectionType_of<B> > bm_type;
                                                                                                                                                                                                                                                                                                                                                             bm_type bm;
                                                                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                                                                            The following now describes the resulting map views of the bidirectional map.

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                              • bm.left is signature-compatible with LeftMapType<A,B>
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • bm.right is signature-compatible with RightMapType<B,A>
                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Configuration parameters @@ -349,31 +347,30 @@

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            - + Countries Populations

                                                                                                                                                                                                                                                                                                                                                            We want to store countries populations. The requeriments are:

                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                            1. +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                              1. Get a list of countries in decresing order of their populations.
                                                                                                                                                                                                                                                                                                                                                              2. -
                                                                                                                                                                                                                                                                                                                                                              3. +
                                                                                                                                                                                                                                                                                                                                                              4. Given a countrie, get their population.

                                                                                                                                                                                                                                                                                                                                                              Lets create the appropiate bimap.

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap<
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap<
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                   unordered_set_of< std::string >,
                                                                                                                                                                                                                                                                                                                                                                   multiset_of< long, std::greater<long> >
                                                                                                                                                                                                                                                                                                                                                              @@ -401,8 +398,7 @@
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap<
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap<
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                   unordered_set_of< std::string >,
                                                                                                                                                                                                                                                                                                                                                                   multiset_of< long, std::greater<long> >
                                                                                                                                                                                                                                                                                                                                                              @@ -422,7 +418,7 @@
                                                                                                                                                                                                                                                                                                                                                               std::cout << "Countries by their population:" << std::endl;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               // First requirement
                                                                                                                                                                                                                                                                                                                                                              -1for( population_bimap::right_const_iterator
                                                                                                                                                                                                                                                                                                                                                              +1for( population_bimap::right_const_iterator
                                                                                                                                                                                                                                                                                                                                                                       i = pop.right.begin(), iend = pop.right.end();
                                                                                                                                                                                                                                                                                                                                                                       i != iend ; ++i )
                                                                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                                                              @@ -430,7 +426,7 @@
                                                                                                                                                                                                                                                                                                                                                               }
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               // Second requirement
                                                                                                                                                                                                                                                                                                                                                              -2std::cout << "Population of China: " << pop.left.at("China") << std::endl;
                                                                                                                                                                                                                                                                                                                                                              +2std::cout << "Population of China: " << pop.left.at("China") << std::endl;
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              @@ -440,12 +436,12 @@

                                                                                                                                                                                                                                                                                                                                                              - + - + @@ -456,7 +452,7 @@

                                                                                                                                                                                                                                                                                                                                                              - + Repetitions counter
                                                                                                                                                                                                                                                                                                                                                              @@ -472,11 +468,10 @@

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap
                                                                                                                                                                                                                                                                                                                                                               <
                                                                                                                                                                                                                                                                                                                                                                   unordered_set_of< std::string >,
                                                                                                                                                                                                                                                                                                                                                              -    list_of< counter > 1
                                                                                                                                                                                                                                                                                                                                                              +    list_of< counter > 1
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               > word_counter;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              @@ -497,11 +492,11 @@
                                                                                                                                                                                                                                                                                                                                                               for( text_tokenizer::const_iterator it = tok.begin(), it_end = tok.end();
                                                                                                                                                                                                                                                                                                                                                                    it != it_end ; ++it )
                                                                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                                                              -    2++ wc.left[*it];
                                                                                                                                                                                                                                                                                                                                                              +    2++ wc.left[*it];
                                                                                                                                                                                                                                                                                                                                                               }
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               // list words with counters by order of appearance
                                                                                                                                                                                                                                                                                                                                                              -3for( word_counter::right_const_iterator
                                                                                                                                                                                                                                                                                                                                                              +3for( word_counter::right_const_iterator
                                                                                                                                                                                                                                                                                                                                                                       wit = wc.right.begin(), wit_end = wc.right.end();
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                    wit != wit_end; ++wit )
                                                                                                                                                                                                                                                                                                                                                              @@ -517,19 +512,19 @@
                                                                                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                                                                              1

                                                                                                                                                                                                                                                                                                                                                              1

                                                                                                                                                                                                                                                                                                                                                              The right map view works like a std::multimap< long, std::string, std::greater<long> >, We can iterate over it to print the results in the required order.

                                                                                                                                                                                                                                                                                                                                                              2

                                                                                                                                                                                                                                                                                                                                                              2

                                                                                                                                                                                                                                                                                                                                                              The left map view works like a std::unordered_map< std::string, long >, given the name of the country we can use it to search for the population in constant time

                                                                                                                                                                                                                                                                                                                                                              - + - + - + diff --git a/doc/html/boost_bimap/the_tutorial/differences_with_standard_maps.html b/doc/html/boost_bimap/the_tutorial/differences_with_standard_maps.html index 347e67f..bd8e5d6 100644 --- a/doc/html/boost_bimap/the_tutorial/differences_with_standard_maps.html +++ b/doc/html/boost_bimap/the_tutorial/differences_with_standard_maps.html @@ -3,8 +3,8 @@ Differences with standard maps - - + + @@ -14,15 +14,15 @@ - - + +

                                                                                                                                                                                                                                                                                                                                                              1

                                                                                                                                                                                                                                                                                                                                                              1

                                                                                                                                                                                                                                                                                                                                                              counter is an integer that is initialized in zero in the constructor

                                                                                                                                                                                                                                                                                                                                                              2

                                                                                                                                                                                                                                                                                                                                                              2

                                                                                                                                                                                                                                                                                                                                                              Because the right collection type is list_of, the right data is not used a key and can be modified in the same way as with standard maps.

                                                                                                                                                                                                                                                                                                                                                              3

                                                                                                                                                                                                                                                                                                                                                              3

                                                                                                                                                                                                                                                                                                                                                              When we insert the elements using the left map view, the element is inserted at the end of the list.

                                                                                                                                                                                                                                                                                                                                                              Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

                                                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              @@ -45,8 +45,7 @@ constrains in each of them. Some insertions that we give for granted to success in standard maps fails with bimaps. For example:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -bimap<int,std::string> bm;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              bimap<int,std::string> bm;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               bm.left.insert(1,"orange");
                                                                                                                                                                                                                                                                                                                                                               bm.left.insert(2,"orange"); // No effect! returns make_pair(iter,false)
                                                                                                                                                                                                                                                                                                                                                              @@ -58,8 +57,7 @@
                                                                                                                                                                                                                                                                                                                                                                         values are different and it is allowed by the right map view because it
                                                                                                                                                                                                                                                                                                                                                                         is a non-unique collection type.
                                                                                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -bimap<int, multiset_of<std::string> > bm;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              bimap<int, multiset_of<std::string> > bm;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               bm.left.insert(1,"orange");
                                                                                                                                                                                                                                                                                                                                                               bm.left.insert(2,"orange"); // Insertion succeed!
                                                                                                                                                                                                                                                                                                                                                              @@ -69,7 +67,7 @@
                                                                                                                                                                                                                                                                                                                                                                         allowed by it too.
                                                                                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              @@ -83,8 +81,7 @@ is no problem with modifying the data of that side. The following code is valid:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap< int, list_of< std::string > > bm_type;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap< int, list_of< std::string > > bm_type;
                                                                                                                                                                                                                                                                                                                                                               bm_type bm;
                                                                                                                                                                                                                                                                                                                                                               bm.insert( bm_type::relation( 1, "one" ) );
                                                                                                                                                                                                                                                                                                                                                               ...
                                                                                                                                                                                                                                                                                                                                                              @@ -343,7 +340,7 @@
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              operator[] and at() @@ -354,8 +351,7 @@ to retrieve the associated data of a given key only when the other collection type is a mutable one. In these cases it works in the same way as the standard.

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -bimap< unorderd_set_of< std::string>, list_of<int> > bm;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              bimap< unorderd_set_of< std::string>, list_of<int> > bm;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               bm.left["one"] = 1; // Ok
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              @@ -363,8 +359,7 @@ The standard defines an access function for map and unordered_map:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -const data_type & at(const key_type & k) const;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              const data_type & at(const key_type & k) const;
                                                                                                                                                                                                                                                                                                                                                                     data_type & at(const key_type & k);
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              @@ -388,8 +383,7 @@

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap< set_of< std::string >, list_of< int > > bm_type;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap< set_of< std::string >, list_of< int > > bm_type;
                                                                                                                                                                                                                                                                                                                                                               bm_type bm;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               try
                                                                                                                                                                                                                                                                                                                                                              @@ -413,8 +407,7 @@
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -typedef bimap< multiset_of<std::string>, unordered_set_of<int> > bm_type;
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              typedef bimap< multiset_of<std::string>, unordered_set_of<int> > bm_type;
                                                                                                                                                                                                                                                                                                                                                               bm_type bm;
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               bm.right[1] = "one"; // compilation error
                                                                                                                                                                                                                                                                                                                                                              @@ -437,7 +430,7 @@
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Complexity of operations diff --git a/doc/html/boost_bimap/the_tutorial/discovering_the_bimap_framework.html b/doc/html/boost_bimap/the_tutorial/discovering_the_bimap_framework.html index 41305a1..eb2d7a4 100644 --- a/doc/html/boost_bimap/the_tutorial/discovering_the_bimap_framework.html +++ b/doc/html/boost_bimap/the_tutorial/discovering_the_bimap_framework.html @@ -3,8 +3,8 @@ Discovering the bimap framework - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Interpreting bidirectional maps @@ -51,7 +51,7 @@ and data from the left collection.

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Standard mapping framework @@ -73,7 +73,7 @@ containers.

                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                              Table 1.1. std associative containers

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Table 1.1. std associative containers

                                                                                                                                                                                                                                                                                                                                                              @@ -171,7 +171,7 @@
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Bimap mapping framework @@ -215,7 +215,7 @@ The following code snippet shows the relation between a bimap and standard maps.

                                                                                                                                                                                                                                                                                                                                                              -

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              @@ -226,8 +226,7 @@ Views cannot be constructed as separate objects from the container they belong to, so the following:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -// Wrong: we forgot the & after bm_type::left_type
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              // Wrong: we forgot the & after bm_type::left_type
                                                                                                                                                                                                                                                                                                                                                               bm_type::left_map lm = bm.left;
                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                                                                                                              @@ -244,8 +243,7 @@

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -template< class Map, class CompatibleKey, class CompatibleData >
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              template< class Map, class CompatibleKey, class CompatibleData >
                                                                                                                                                                                                                                                                                                                                                               void use_it( Map & m,
                                                                                                                                                                                                                                                                                                                                                                            const CompatibleKey  & key,
                                                                                                                                                                                                                                                                                                                                                                            const CompatibleData & data )
                                                                                                                                                                                                                                                                                                                                                              diff --git a/doc/html/boost_bimap/the_tutorial/the_collection_of_relations_type.html b/doc/html/boost_bimap/the_tutorial/the_collection_of_relations_type.html
                                                                                                                                                                                                                                                                                                                                                              index 446e721..6541562 100644
                                                                                                                                                                                                                                                                                                                                                              --- a/doc/html/boost_bimap/the_tutorial/the_collection_of_relations_type.html
                                                                                                                                                                                                                                                                                                                                                              +++ b/doc/html/boost_bimap/the_tutorial/the_collection_of_relations_type.html
                                                                                                                                                                                                                                                                                                                                                              @@ -3,8 +3,8 @@
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               The collection of relations type
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              @@ -14,15 +14,15 @@
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              - - + +
                                                                                                                                                                                                                                                                                                                                                              [Note] NoteBoost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

                                                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              The collection of relations type @@ -34,7 +34,7 @@ parameters
                                                                                                                                                                                                                                                                                                                                                              Examples

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              A new point of view @@ -60,36 +60,36 @@ times where it is useful to give this collection other constraints or simply to order it differently. The user is allowed to choose between:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                • left_based
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • right_based
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • set_of_relation<>
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • multiset_of_relation<>
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • unordered_set_of_relation<>
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • unordered_multiset_of_relation<>
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • list_of_relation
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • vector_of_relation
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • unconstrained_set_of_relation
                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                @@ -122,8 +122,7 @@

                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                -#include <iostream>
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                #include <iostream>
                                                                                                                                                                                                                                                                                                                                                                 #include <string>
                                                                                                                                                                                                                                                                                                                                                                 #include <boost/bimap/bimap.hpp>
                                                                                                                                                                                                                                                                                                                                                                 #include <boost/bimap/list_of.hpp>
                                                                                                                                                                                                                                                                                                                                                                @@ -210,7 +209,7 @@
                                                                                                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Configuration parameters @@ -349,15 +348,14 @@

                                                                                                                                                                                                                                                                                                                                                                [Tip] Tip
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Consider this example:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -template< class Rel >
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              template< class Rel >
                                                                                                                                                                                                                                                                                                                                                               struct RelOrder
                                                                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                                                                   bool operator()(Rel ra, Rel rb) const
                                                                                                                                                                                                                                                                                                                                                              @@ -379,8 +377,7 @@
                                                                                                                                                                                                                                                                                                                                                                         This container will only allow unique relations because set_of_relation
                                                                                                                                                                                                                                                                                                                                                                         has been used but the elements in each side of the bimap can be repeated.
                                                                                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -struct name         {};
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              struct name         {};
                                                                                                                                                                                                                                                                                                                                                               struct phone_number {};
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               typedef bimap
                                                                                                                                                                                                                                                                                                                                                              diff --git a/doc/html/boost_bimap/the_tutorial/unconstrained_sets.html b/doc/html/boost_bimap/the_tutorial/unconstrained_sets.html
                                                                                                                                                                                                                                                                                                                                                              index fe9b0eb..e4a5af2 100644
                                                                                                                                                                                                                                                                                                                                                              --- a/doc/html/boost_bimap/the_tutorial/unconstrained_sets.html
                                                                                                                                                                                                                                                                                                                                                              +++ b/doc/html/boost_bimap/the_tutorial/unconstrained_sets.html
                                                                                                                                                                                                                                                                                                                                                              @@ -3,8 +3,8 @@
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               Unconstrained Sets
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              @@ -14,15 +14,15 @@
                                                                                                                                                                                                                                                                                                                                                               Boost C++ Libraries
                                                                                                                                                                                                                                                                                                                                                               Home
                                                                                                                                                                                                                                                                                                                                                               Libraries
                                                                                                                                                                                                                                                                                                                                                              -People
                                                                                                                                                                                                                                                                                                                                                              -FAQ
                                                                                                                                                                                                                                                                                                                                                              +People
                                                                                                                                                                                                                                                                                                                                                              +FAQ
                                                                                                                                                                                                                                                                                                                                                               More
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                              PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Unconstrained Sets @@ -36,16 +36,16 @@

                                                                                                                                                                                                                                                                                                                                                              Unconstrained sets are useful for the following reasons:

                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                • A bimap type has stronger guarantees than its standard equivalent, and includes some useful functions (replace, modify) that the standard does not have.
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • You can view the mapping as a collection of relations.
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • Using this kind of map makes the code very extensible. If, at any moment of the development, the need to perform searches from the right side of the mapping arises, the only necessary change is to the typedef. @@ -59,8 +59,7 @@

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -typedef bimap< std::string, unconstrained_set_of<int> > bm_type;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  typedef bimap< std::string, unconstrained_set_of<int> > bm_type;
                                                                                                                                                                                                                                                                                                                                                                   typedef bm_type::left_map map_type;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                  @@ -78,8 +77,7 @@
                                                                                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -typedef std::map< std::string, int > map_type;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  typedef std::map< std::string, int > map_type;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   map_type m;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                  @@ -95,14 +93,13 @@

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -m["one"] = 1;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  m["one"] = 1;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   assert( m.find("one") != m.end() );
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   for( map_type::iterator i = m.begin(), iend = m.end(); i != iend; ++i )
                                                                                                                                                                                                                                                                                                                                                                   {
                                                                                                                                                                                                                                                                                                                                                                  -    1++(i->second);
                                                                                                                                                                                                                                                                                                                                                                  +    1++(i->second);
                                                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   m.erase("one");
                                                                                                                                                                                                                                                                                                                                                                  @@ -114,7 +111,7 @@
                                                                                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  The right collection of the bimap is mutable so its elements can be modified using iterators.

                                                                                                                                                                                                                                                                                                                                                                  @@ -130,11 +127,10 @@

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -typedef map_type::const_iterator const_iterator;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  typedef map_type::const_iterator const_iterator;
                                                                                                                                                                                                                                                                                                                                                                   typedef std::pair<const_iterator,const_iterator> const_range;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                  -1const_range r = m.range( "one" <= _key, _key <= "two" );
                                                                                                                                                                                                                                                                                                                                                                  +1const_range r = m.range( "one" <= _key, _key <= "two" );
                                                                                                                                                                                                                                                                                                                                                                   for( const_iterator i = r.first; i != r.second; ++i )
                                                                                                                                                                                                                                                                                                                                                                   {
                                                                                                                                                                                                                                                                                                                                                                       std::cout << i->first << "-->" << i->second << std::endl;
                                                                                                                                                                                                                                                                                                                                                                  @@ -149,7 +145,7 @@
                                                                                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  This range is a model of BidirectionalRange, read the docs of Boost.Range for more information.

                                                                                                                                                                                                                                                                                                                                                                  diff --git a/doc/html/boost_bimap/the_tutorial/useful_functions.html b/doc/html/boost_bimap/the_tutorial/useful_functions.html index ee3563e..b48ed3b 100644 --- a/doc/html/boost_bimap/the_tutorial/useful_functions.html +++ b/doc/html/boost_bimap/the_tutorial/useful_functions.html @@ -3,8 +3,8 @@ Useful functions - - + + @@ -14,15 +14,15 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
                                                                                                                                                                                                                                                                                                                                                                  PrevUpHomeNext
                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  + -
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Projection of iterators @@ -59,8 +59,7 @@

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -typedef bimap<std::string,multiset_of<int,std::greater<int> > > bm_type;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  typedef bimap<std::string,multiset_of<int,std::greater<int> > > bm_type;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                   bm.insert( bm_type::value_type("John" ,34) );
                                                                                                                                                                                                                                                                                                                                                                  @@ -82,7 +81,7 @@
                                                                                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  replace and modify @@ -105,8 +104,7 @@

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                  -typedef bimap< int, std::string > bm_type;
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  typedef bimap< int, std::string > bm_type;
                                                                                                                                                                                                                                                                                                                                                                   bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                   bm.insert( bm_type::value_type(1,"one") );
                                                                                                                                                                                                                                                                                                                                                                  @@ -130,7 +128,7 @@
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                       bool successful_replace = bm.left.replace_data( it, "two" );
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                  -    1assert( ! successful_replace );
                                                                                                                                                                                                                                                                                                                                                                  +    1assert( ! successful_replace );
                                                                                                                                                                                                                                                                                                                                                                       assert( bm.size() == 2 );
                                                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                  @@ -141,7 +139,7 @@

                                                                                                                                                                                                                                                                                                                                                                  - +

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  1

                                                                                                                                                                                                                                                                                                                                                                  it is still valid here, and the bimap was left unchanged

                                                                                                                                                                                                                                                                                                                                                                  @@ -153,15 +151,15 @@ replace functions performs this substitution in such a manner that:

                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                    • The complexity is constant time if the changed element retains its original order with respect to all views; it is logarithmic otherwise.
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • Iterator and reference validity are preserved.
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • The operation is strongly exception-safe, i.e. the bimap remains unchanged if some exception (originated by the system or the user's data types) is thrown. @@ -215,8 +213,7 @@

                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                      -typedef bimap< int, std::string > bm_type;
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      typedef bimap< int, std::string > bm_type;
                                                                                                                                                                                                                                                                                                                                                                       bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                       bm.insert( bm_type::value_type(1,"one") );
                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                      @@ -239,7 +236,7 @@
                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                           bool successful_modify = bm.left.modify_data( it, _data = "two" );
                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                      -    1assert( ! successful_modify );
                                                                                                                                                                                                                                                                                                                                                                      +    1assert( ! successful_modify );
                                                                                                                                                                                                                                                                                                                                                                           assert( bm.size() == 1 );
                                                                                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                      @@ -250,7 +247,7 @@

                                                                                                                                                                                                                                                                                                                                                                      - +

                                                                                                                                                                                                                                                                                                                                                                      1

                                                                                                                                                                                                                                                                                                                                                                      1

                                                                                                                                                                                                                                                                                                                                                                      it is not longer valid and (1,"1") is removed from the bimap

                                                                                                                                                                                                                                                                                                                                                                      @@ -259,7 +256,7 @@

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Retrieval of ranges @@ -278,8 +275,7 @@

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    -typedef bimap<int,std::string> bm_type;
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    typedef bimap<int,std::string> bm_type;
                                                                                                                                                                                                                                                                                                                                                                     bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                     // ...
                                                                                                                                                                                                                                                                                                                                                                    @@ -303,8 +299,7 @@
                                                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    -bm_type::left_iterator iter_first  = bm.left.upper_bound(20);
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    bm_type::left_iterator iter_first  = bm.left.upper_bound(20);
                                                                                                                                                                                                                                                                                                                                                                     bm_type::left_iterator iter_second = bm.left.lower_bound(50);
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                     // range [iter_first,iter_second) contains the elements in (20,50)
                                                                                                                                                                                                                                                                                                                                                                    @@ -331,15 +326,14 @@
                                                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    -typedef bimap<int,std::string> bm_type;
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    typedef bimap<int,std::string> bm_type;
                                                                                                                                                                                                                                                                                                                                                                     bm_type bm;
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                     // ...
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                    -1bm_type::left_range_type r;
                                                                                                                                                                                                                                                                                                                                                                    +1bm_type::left_range_type r;
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                    -2r = bm.left.range( 20 <= _key, _key <= 50 ); // [20,50]
                                                                                                                                                                                                                                                                                                                                                                    +2r = bm.left.range( 20 <= _key, _key <= 50 ); // [20,50]
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                     r = bm.left.range( 20 <  _key, _key <  50 ); // (20,50)
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                    @@ -353,13 +347,13 @@
                                                                                                                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                                                                                    - + - + @@ -383,12 +377,11 @@

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    -r = bm.left.range( 20 <= _key, unbounded ); // [20,inf)
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    r = bm.left.range( 20 <= _key, unbounded ); // [20,inf)
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                     r = bm.left.range( unbounded , _key < 50 ); // (-inf,50)
                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                    -1r = bm.left.range( unbounded , unbounded ); // (-inf,inf)
                                                                                                                                                                                                                                                                                                                                                                    +1r = bm.left.range( unbounded , unbounded ); // (-inf,inf)
                                                                                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                                                                                    @@ -397,7 +390,7 @@

                                                                                                                                                                                                                                                                                                                                                                    1

                                                                                                                                                                                                                                                                                                                                                                    1

                                                                                                                                                                                                                                                                                                                                                                    range_type is a handy typedef equal to std::pair<iterator,iterator>. const_range_type is provided too, and it is equal to std::pair<const_iterator,const_iterator>

                                                                                                                                                                                                                                                                                                                                                                    2

                                                                                                                                                                                                                                                                                                                                                                    2

                                                                                                                                                                                                                                                                                                                                                                    _key is a Boost.Lambda placeholder. To use it you have to include <boost/bimap/support/lambda.hpp>

                                                                                                                                                                                                                                                                                                                                                                    - +

                                                                                                                                                                                                                                                                                                                                                                    1

                                                                                                                                                                                                                                                                                                                                                                    1

                                                                                                                                                                                                                                                                                                                                                                    This is equivalent to std::make_pair(s.begin(),s.end())

                                                                                                                                                                                                                                                                                                                                                                    diff --git a/doc/html/index.html b/doc/html/index.html index c29e5ec..9dcd383 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,8 +3,8 @@ Chapter 1. Boost.Bimap - - + + @@ -12,13 +12,13 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


                                                                                                                                                                                                                                                                                                                                                                    Next
                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Chapter 1. Boost.Bimap

                                                                                                                                                                                                                                                                                                                                                                    @@ -26,8 +26,8 @@ Matias Capeletto

                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

                                                                                                                                                                                                                                                                                                                                                                    @@ -115,12 +115,12 @@
                                                                                                                                                                                                                                                                                                                                                                    Acknowledgements
                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    - + Description

                                                                                                                                                                                                                                                                                                                                                                    @@ -137,7 +137,7 @@ containers.

                                                                                                                                                                                                                                                                                                                                                                    - + Influences and Related Work

                                                                                                                                                                                                                                                                                                                                                                    @@ -149,7 +149,7 @@
                                                                                                                                                                                                                                                                                                                                                                    - +

                                                                                                                                                                                                                                                                                                                                                                    Last revised: March 15, 2008 at 13:59:41 GMT

                                                                                                                                                                                                                                                                                                                                                                    Last revised: November 20, 2009 at 09:43:59 GMT