Commit Graph

40 Commits

Author SHA1 Message Date
Daniel James
ddab816ed7 Use BOOST_HAS_PRAGMA_ONCE.
Remembering to first include config, so that it'll actually be defined.

[SVN r86726]
2013-11-16 20:13:24 +00:00
Stephen Kelly
3aa91346ea Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
Daniel James
f5d52cc9b2 Move the unordered headers into the unordered directory.
[SVN r48803]
2008-09-16 21:49:41 +00:00
Daniel James
62427c8287 Forward headers for the unordered containers.
[SVN r48802]
2008-09-16 21:45:53 +00:00
Daniel James
d6f513be52 Rename 'emplace' with hint to 'emplace_hint'.
[SVN r48081]
2008-08-11 07:52:37 +00:00
Daniel James
4305d10264 On second thoughts, I'll just completely remove hash_value for ordered
containers. It's low quality and not very generic (it uses boost::hash for
mapped values). Should be a painless change.


[SVN r47465]
2008-07-15 22:03:15 +00:00
Daniel James
d66936a640 Require explicit conversion from allocators.
(Not what it says in the draft standard, but I think that might be a defect).


[SVN r47085]
2008-07-04 22:57:20 +00:00
Daniel James
3640e1e96c Workaround for some template syntax not supported in old versions of Visual C++ 6.5
[SVN r47040]
2008-07-03 14:34:56 +00:00
Daniel James
ec1e809fc3 Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.

Merged revisions 46594-46604 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk


[SVN r46607]
2008-06-22 13:54:45 +00:00
Daniel James
9bd3f498a7 Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.


[SVN r46579]
2008-06-21 15:32:11 +00:00
Daniel James
659a014976 Fix in an error in the unordered containers' emulated move constructors. These
aren't actually used, so I could probalby just remove 'move_from' for now (it's
used in the full move library).


[SVN r46410]
2008-06-15 17:03:37 +00:00
Daniel James
18e46ae624 Fix for older versions of the Borland C++ compiler which create the default
'operator=' even when an 'operator=' which takes its argument by value has been
defined. This causes assignments to be ambiguous. To work around this, I'm
removing the definitions on those compilers - breaking move assignment, but
allowing other assignments to work.

I'm using 0x0593 because that's the earliest compiler that I've seen do the
right thing, but it might also work on earlier 5.9.x versions.

Refs #1923.



[SVN r45573]
2008-05-20 15:13:57 +00:00
Daniel James
0bf6fcba47 The unordered containers are failing to compile on Borland. This is a short in
the dark at fixing that.


[SVN r45262]
2008-05-10 13:53:35 +00:00
Daniel James
b5db48b6a4 Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.

Merged revisions 44778-44835,44837-44918 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
  
  Remove a trailing comma.
........
  r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
  
  Merge in support for equality operators.
........
  r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
  
  Use my own list container to avoid working around STL container bugs.
........
  r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Better equality tests.
........
  r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Remove a superfluous check.
........
  r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Add equality reference documentation.
........
  r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
  
  New version of list.hpp
........
  r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
  
  Support compilers without ADL in the compile tests.
........
  r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
  
  Change the typedef of buffered functions as it was confusing MSVC 6.5
  
  get_allocator wasn't compiling when the allocator workaround is used because it
  couldn't cast from the wrapped allocator to an allocator of another type. So
  use value_alloc_ when it's available (it's only unavailable on compilers with
  C++0x support, which don't require the workaround).
........


[SVN r44919]
2008-04-30 07:57:04 +00:00
Daniel James
94932ae026 Merge support for emplace for compilers with rvalue references and variadic templates arguments, and better use of C++0x allocators.
Merged revisions 44058-44075,44078-44084,44086-44108,44110-44365,44367,44369-44414,44416-44419,44421-44457,44467-44469,44471-44511,44513-44535,44537-44737 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r44467 | danieljames | 2008-04-16 18:35:56 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Add C++-0x support to the test allocators.
................
  r44468 | danieljames | 2008-04-16 18:36:06 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Add a C++-0x node_constructor.
................
  r44469 | danieljames | 2008-04-16 18:36:16 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  C++-0x constructor for node.
................
  r44516 | danieljames | 2008-04-17 21:41:48 +0100 (Thu, 17 Apr 2008) | 16 lines
  
  Merge in my work so far on implementing emplace for compilers with variadic
  template & rvalue references.
  
  Merged revisions 44059-44062 via svnmerge from 
  https://svn.boost.org/svn/boost/branches/unordered/dev
  
  ........
    r44059 | danieljames | 2008-04-05 17:41:25 +0100 (Sat, 05 Apr 2008) | 1 line
    
    First stab at implementing emplace - only for compilers with variadic template & rvalue references.
  ........
    r44062 | danieljames | 2008-04-05 19:12:09 +0100 (Sat, 05 Apr 2008) | 1 line
    
    Better variable template arguments, need to add proper support to BoostBook.
  ........
................
  r44616 | danieljames | 2008-04-20 13:30:19 +0100 (Sun, 20 Apr 2008) | 1 line
  
  Merge with trunk, fixes tabs.
................
  r44618 | danieljames | 2008-04-20 13:42:38 +0100 (Sun, 20 Apr 2008) | 2 lines
  
  Some extra compile tests.
................
  r44619 | danieljames | 2008-04-20 13:42:50 +0100 (Sun, 20 Apr 2008) | 2 lines
  
  Fix an error message.
................
  r44703 | danieljames | 2008-04-21 20:19:50 +0100 (Mon, 21 Apr 2008) | 15 lines
  
  Merge latest changes from trunk.
  
  Merged revisions 44616-44702 via svnmerge from 
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r44650 | danieljames | 2008-04-20 22:08:57 +0100 (Sun, 20 Apr 2008) | 1 line
    
    Update an include.
  ........
    r44697 | danieljames | 2008-04-21 16:55:40 +0100 (Mon, 21 Apr 2008) | 1 line
    
    Factor out the code for choosing the bucket count, and which bucket that hash values map to make it easier to experiment with alternative policies.
  ........
................
  r44733 | danieljames | 2008-04-23 07:55:43 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Remove 'reserve_extra'.
................
  r44734 | danieljames | 2008-04-23 07:55:55 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  More unnecessary copy tests - showing some weakness in the emplace implementation.
................
  r44735 | danieljames | 2008-04-23 07:56:06 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  More tests.
................
  r44736 | danieljames | 2008-04-23 07:56:19 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Comment out a test which requires a C++0x std::pair.
................
  r44737 | danieljames | 2008-04-23 07:56:35 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Avoid creating unnecessary copies in unordered_set::emplace and unordered_map::emplace.
................


[SVN r44738]
2008-04-23 07:09:58 +00:00
Daniel James
15666285fa Refactor the hash table implementation a little bit. Some of the changes are to
make implementing emplace easier.

Merged revisions 44458-44460,44463-44465 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44458 | danieljames | 2008-04-16 18:31:35 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Pull out the buffered functions.
........
  r44459 | danieljames | 2008-04-16 18:31:45 +0100 (Wed, 16 Apr 2008) | 4 lines
  
  Inline construct_node and create_node into copy_group - these used to be used
  in the implementation of insert but aren't now because of insert's exception
  requirements, so keeping them around was just confusing.
........
  r44460 | danieljames | 2008-04-16 18:31:54 +0100 (Wed, 16 Apr 2008) | 4 lines
  
  Change link_node so that it takes a node_constructor containing a constructed
  node instead of a node - this makes the code a little cleaner and also
  simplifies exception safety.
........
  r44463 | danieljames | 2008-04-16 18:35:11 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Explicitly name the different insert overloads.
........
  r44464 | danieljames | 2008-04-16 18:35:22 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Explicitly name the different erase overloads.
........
  r44465 | danieljames | 2008-04-16 18:35:33 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Call the erase methods in hash_table_data directly.
........


[SVN r44489]
2008-04-17 07:45:20 +00:00
Daniel James
cf529e496a Movable unordered containers, full support only for compilers with rvalue references.
Merged revisions 44076-44414 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44076 | danieljames | 2008-04-06 20:41:19 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Move semantics for compilers with rvalue references.
........
  r44077 | danieljames | 2008-04-06 20:48:59 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Do move assignment 'properly'.
........
  r44085 | danieljames | 2008-04-06 22:46:04 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Use normal references for the move members, reset the source buckets_ pointer to stop the buckets getting deleted, and remove a superflous pointer check.
........
  r44109 | danieljames | 2008-04-07 23:49:36 +0100 (Mon, 07 Apr 2008) | 1 line
  
  Add missing tests.
........
  r44366 | danieljames | 2008-04-13 12:59:46 +0100 (Sun, 13 Apr 2008) | 1 line
  
  Avoid using rvalue references in the implementation files.
........
  r44368 | danieljames | 2008-04-13 15:13:33 +0100 (Sun, 13 Apr 2008) | 6 lines
  
  Use a cut down version of the work in progress move library to implement move
  semantics on more compilers. Unfortunately the move constructor with allocator
  isn't really practical at the moment, since in the case where the container
  can't be moved, and the allocators aren't equal it will copy the container
  twice.
........


[SVN r44486]
2008-04-17 07:34:15 +00:00
Daniel James
5989e9227c Add the new allocator constructors, use composition instead of inheritance for the implementation and some small fixes.
Merged revisions 43922,43962,43966,43971,43981,43995-43996,44042,44046-44048,44057 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r43922 | danieljames | 2008-03-29 14:55:59 +0000 (Sat, 29 Mar 2008) | 1 line
  
  Fix some typos in the reference documentation.
........
  r43962 | danieljames | 2008-03-31 18:29:59 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Add a name variable to the release script, so that I can have different release names in different branches.
........
  r43966 | danieljames | 2008-03-31 18:43:16 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Fix the image directory for standalone docs.
........
  r43971 | danieljames | 2008-03-31 19:17:25 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Fix the unordered stylesheet.
........
  r43981 | danieljames | 2008-04-01 13:31:26 +0100 (Tue, 01 Apr 2008) | 2 lines
  
  Cast the pointer in the Visual C++ 6.5 _Charalloc method.
........
  r43995 | danieljames | 2008-04-02 12:50:27 +0100 (Wed, 02 Apr 2008) | 1 line
  
  Try using the interprocess containers for testing. Compilation is a bit slower but hopefully I'll run into less cross-platform problems.
........
  r43996 | danieljames | 2008-04-02 13:25:49 +0100 (Wed, 02 Apr 2008) | 1 line
  
  Revert my experiment with the interprocess containers. It didn't work out.
........
  r44042 | danieljames | 2008-04-04 20:38:09 +0100 (Fri, 04 Apr 2008) | 1 line
  
  Make hash table data a member of hash table, instead of a base.
........
  r44046 | danieljames | 2008-04-05 12:38:05 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Remove rvalue_ref from Jamfile.v2 - I didn't mean to check it in.
........
  r44047 | danieljames | 2008-04-05 12:39:38 +0100 (Sat, 05 Apr 2008) | 1 line
  
  New constructors with allocators.
........
  r44048 | danieljames | 2008-04-05 12:58:11 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Document the new constructors.
........
  r44057 | danieljames | 2008-04-05 17:08:23 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Fix some bugs in the exception testing code.
........


[SVN r44417]
2008-04-14 15:10:26 +00:00
Daniel James
6aa582a90e Merged revisions 43838-43894 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r43840 | danieljames | 2008-03-24 17:25:07 +0000 (Mon, 24 Mar 2008) | 1 line
  
  Fix a g++ warning.
........
  r43844 | danieljames | 2008-03-24 17:56:28 +0000 (Mon, 24 Mar 2008) | 1 line
  
  It's a new-ish year.
........
  r43885 | danieljames | 2008-03-27 20:36:10 +0000 (Thu, 27 Mar 2008) | 1 line
  
  The release script doesn't need to copy images and css - because that's now done in the jamfiles. Also tweak the shell script a tad bit.
........
  r43890 | danieljames | 2008-03-27 23:01:40 +0000 (Thu, 27 Mar 2008) | 1 line
  
  Starting to add a docbook bibliography.
........
  r43894 | danieljames | 2008-03-27 23:24:18 +0000 (Thu, 27 Mar 2008) | 1 line
  
  Redeclare 'data' in iterator_base to help compilers which have trouble with accessing the nested typedef.
........


[SVN r43895]
2008-03-27 23:38:01 +00:00
Daniel James
7fd651ff75 Add library identification.
[SVN r42538]
2008-01-06 17:45:18 +00:00
Daniel James
184a38fee1 Use BOOST_DEDUCED_TYPENAME in unordered_set.hpp and unordered_map.hpp
[SVN r42207]
2007-12-20 19:16:30 +00:00
Daniel James
a68da27339 Merge: Support for cbegin(n), cend(n).
[SVN r42188]
2007-12-19 23:13:20 +00:00
Daniel James
56f91ea407 Use pre-review copy of unordered for trunk.
[SVN r42183]
2007-12-19 22:42:12 +00:00
Daniel James
3002a898a0 If the containers have equality comparisons, they'll also need 'hash_value'. Untested and undocumented, as before.
[SVN r42108]
2007-12-16 18:20:25 +00:00
Daniel James
c918da0249 operator== work in progress, undocumented and untested.
[SVN r42106]
2007-12-16 17:48:25 +00:00
Daniel James
1bb2dc4883 Support for cbegin(n), cend(n).
[SVN r42103]
2007-12-16 13:32:04 +00:00
Daniel James
f0c62d3f0f Test, implement and document 'at'.
[SVN r41125]
2007-11-16 00:31:12 +00:00
Daniel James
50c629dcb0 Change insert/erase as specified in n2369, the implementation and tests.
I accidently only checked in the documentation from these changes in the
last check in. This contains the rest of it.


[SVN r39950]
2007-10-11 23:49:31 +00:00
Daniel James
df1e1598a5 Import latest changes to the unordered containers. Includes:
Copyright update.
Switch back to the version where the sentinel points to itself.
Remove alternative versions of swap.
Workaround a borland bug or two.
More consistent use of class/swap/template.
Avoid a few warnings.
Add a no-throw swap to the allocator for exception testing.


[SVN r3793]
2007-03-18 20:00:59 +00:00
Daniel James
9e51e23cea Remove some of the old doxygen stuff from the unordered container header files
as I'm not using doxygen.


[SVN r3618]
2007-01-10 00:03:26 +00:00
Daniel James
cb578defef Update copyright.
[SVN r3043]
2006-07-01 22:34:48 +00:00
Daniel James
9bd73e4ba7 New version of the unordered associative containers, with a more efficient data
structure for unordered_multimap/unordered_multiset that uses an extra
pointer per node but makes most operations more efficient when equivalent
nodes are present.

Now uses macros instead of template metaprogramming to implement the
differences between containers with equivalent and unique keys.

Removed the erase_iterator stuff which complicated matters more than it helped.
Now just using pointers with some helper functions.


[SVN r2950]
2006-05-07 13:24:17 +00:00
Daniel James
13f2fbaf00 Update unordered container links to the new draft standard.
[SVN r2948]
2006-04-30 15:00:11 +00:00
Daniel James
0fcb2d8041 Add cbegin() and cend() from the new draft standard to the unordered containers.
The standard doesn't add them for local iterators, but I'm guessing that's an
oversight. So for now, I've hidden them behind a preprocessor condition. Which
I'll probably remove before review.


[SVN r2944]
2006-04-30 14:11:47 +00:00
Daniel James
ed6df529e4 Remove non-ascii copyright characters and the old filenames from the start of
the unordered container headers.


[SVN r2924]
2006-04-17 11:11:49 +00:00
Daniel James
e8faab1268 Update the unordered containers' iterator overloads for the more recent versions of TR1.
[SVN r2921]
2006-04-17 08:45:32 +00:00
Daniel James
ee93aad35a New version of the unordered containers. Includes workarounds for older
compilers. Also follows the exception requirements closer.


[SVN r2875]
2006-02-26 18:33:49 +00:00
Daniel James
78e843f3cb Update the links in the unordered headers.
[SVN r2676]
2005-08-04 22:45:46 +00:00
Daniel James
f3b00bc938 Import my latest version of the unordered associative containers.
Several changes:

- Makes insert meet its exception specification (but needs some refactoring).
- Some Borland work arounds, but not all there yet, maybe never will be.
- Some extra doxygen comments, but not nearly enough.
- Possibly other things that I'm too lazy to look up.


[SVN r2642]
2005-06-20 21:55:28 +00:00
Daniel James
f6a60033e3 Check in unordered associative containers. I haven't looked at these for ages
but they pass my unit tests so they should be okay.


[SVN r2585]
2005-04-24 14:23:24 +00:00