Commit Graph

158 Commits

Author SHA1 Message Date
Marshall Clow
af3a31090c Switch from deprecated macros to new shiny ones; no functionality change
[SVN r79392]
2012-07-09 20:12:04 +00:00
Daniel James
8bc410f571 Hash: Use SFINAE to avoid implicit casts to numbers.
[SVN r78391]
2012-05-08 22:24:46 +00:00
Daniel James
441cea413d Hash: Some formatting.
[SVN r78164]
2012-04-23 20:49:30 +00:00
Daniel James
98953a28c7 Hash: Support std::array and std::tuple. Refs #6806.
[SVN r78144]
2012-04-22 19:46:28 +00:00
Daniel James
f98a942e2e Unordered/hash: Avoid a gcc warning. Refs #6771
[SVN r77832]
2012-04-08 15:29:15 +00:00
Daniel James
ce885af9b0 Fix copy and paste typo. Refs #4756.
[SVN r68182]
2011-01-16 11:06:00 +00:00
Daniel James
9e641187c6 Oops, make new hash_value overload inline.
[SVN r68147]
2011-01-14 03:36:39 +00:00
Daniel James
7dc95d044d Support typeindex in hash. Refs #4756.
[SVN r68145]
2011-01-14 03:13:39 +00:00
Daniel James
ed598f865e Fix tabs and files without copyright.
[SVN r67612]
2011-01-03 12:43:34 +00:00
Daniel James
482f038837 Avoid -Wconversion warnings in unordered & hash.
[SVN r67170]
2010-12-11 14:43:00 +00:00
Daniel James
577054de93 Fix hashing pointers on 64-bit OpenVMS.
Patch by Artyom. Refs #4477

[SVN r64397]
2010-07-27 19:18:53 +00:00
Daniel James
fc3b3863b4 Only include static_assert when necessary.
[SVN r64009]
2010-07-14 08:28:04 +00:00
Daniel James
906f632706 Actually, make the change to hash opt-in, rather than opt-out. It's a bit late to introduce a breaking change.
[SVN r64007]
2010-07-14 08:17:48 +00:00
Daniel James
bbfb6fd32c Release notes for hash.
[SVN r63810]
2010-07-10 13:47:47 +00:00
Daniel James
2553a5fbdc Try preventing static casts when calling hash_value.
[SVN r63716]
2010-07-06 23:32:37 +00:00
Daniel James
733422d1b9 Remove optimization which causes 0.5 to hash to 0. Refs #4038.
I have an internal requirement the 0 hashes to 0, a better solution
might be to remove that, put the optimization back and hash 0 to another
value. Or alternatively, use the main combine function instead.

[SVN r60805]
2010-03-24 08:49:00 +00:00
Daniel James
538b8fb95a Stop using the deprecated BOOST_HAS_ macros in unordered and hash.
[SVN r59697]
2010-02-15 23:01:06 +00:00
Daniel James
6d7a55a4f7 Formatting changes, mostly to fit within 80 characters.
Also, some C casts converted to static_cast.

[SVN r58692]
2010-01-04 22:49:39 +00:00
Daniel James
0ed492ba18 Rename namespace BOOST_HASH_DETECT_FLOAT_FUNCTIONS to lower case for consistency.
[SVN r58632]
2010-01-02 11:12:23 +00:00
Daniel James
3882189584 Try to suppress some more Visual C++ warnings.
[SVN r57976]
2009-11-27 19:43:26 +00:00
Daniel James
9958072d2a Stricter warnings for unordered and hash.
There are still warnings in hash_complex_test.

[SVN r57537]
2009-11-10 08:15:55 +00:00
Daniel James
07b565143f Add am implementation note about the Visual C++ problems.
[SVN r54399]
2009-06-27 07:39:12 +00:00
Jürgen Hunold
d8980c3f09 Fix gcc -pedantic warning: remove extra ";".
[SVN r54146]
2009-06-21 14:38:19 +00:00
Daniel James
c51bebf8a4 Move the support for hashing containers into the extension header, and improve the standard tests.
[SVN r54144]
2009-06-21 09:42:40 +00:00
Daniel James
8b98036bb8 Move BOOST_HASH_CHAR_TRAITS from container_fwd into the hash headers, and undefine it.
[SVN r54143]
2009-06-21 09:42:20 +00:00
Daniel James
4774d24966 Get <boost/functional/hash/extensions.hpp> to work.
[SVN r54142]
2009-06-21 09:42:05 +00:00
Daniel James
13f44653b5 Revert [54025] "Try to avoid using special macro handling code."
[SVN r54141]
2009-06-21 09:41:46 +00:00
Daniel James
e20c872440 Move includes to the header which they're used in.
[SVN r54140]
2009-06-21 09:41:30 +00:00
Daniel James
600740e2ae A few more comments in boost::hash.
[SVN r54139]
2009-06-21 09:41:11 +00:00
Daniel James
3d79c2f1e4 Try to avoid using special macro handling code.
[SVN r54025]
2009-06-17 21:23:42 +00:00
Daniel James
3cf1a67771 Put the minimum amount of implementation in the same namespace as the 'using namespace' directives in order to avoid Visual C++ 8 bug.
[SVN r54024]
2009-06-17 21:22:49 +00:00
Daniel James
9f4a6a966e Try to avoid float to int warning when a float function doesn't exist. Refs #3171.
[SVN r53828]
2009-06-12 18:24:47 +00:00
Daniel James
326a338add Remove misplaced visual C++ warning pragma.
[SVN r53506]
2009-05-31 15:53:09 +00:00
Daniel James
909d0c9547 Fix a couple of clumsy errors in the last commit.
[SVN r53248]
2009-05-25 14:27:00 +00:00
Daniel James
912aed0b57 Check for float functions with less templates.
The only template mechanism now used is full specialization, so this should
hopefully be more portable to compilers we don't test.

[SVN r53247]
2009-05-25 13:45:16 +00:00
Daniel James
e5d343faea Try to deal with macros for frexpl and ldexpl.
The error message for msvc-9.0~wm5~stlport5.2 suggests that frexpl and ldexpl
are macros.

[SVN r53205]
2009-05-23 15:21:38 +00:00
Jürgen Hunold
3e320b7ae5 Fix gcc -pedantic error:extra extra ';'
[SVN r53203]
2009-05-23 13:03:25 +00:00
Daniel James
8bc6175fa0 Explicitly qualify 'none' to avoid confusion with boost::none.
[SVN r53185]
2009-05-22 19:00:35 +00:00
Daniel James
6751e9cf47 Rename struct to avoid using 'type::'type' which confuses some
compilers.

[SVN r53175]
2009-05-22 13:35:56 +00:00
Daniel James
004e4df2a2 Some STLport fixes for hash.
[SVN r53169]
2009-05-22 06:01:35 +00:00
Daniel James
411f559730 Spell out exactly which functions can be used with which types.
I was hitting some ambiguity errors when the function was for the wrong type.

[SVN r53168]
2009-05-22 06:01:19 +00:00
Daniel James
8a6aba46c7 Fix a typo.
[SVN r53167]
2009-05-22 06:00:56 +00:00
Daniel James
65b103e812 Try to automatically detect which float functions are available.
[SVN r53161]
2009-05-21 21:22:04 +00:00
Daniel James
c160428eff Move the two different hash float implementation into their own header.
[SVN r53160]
2009-05-21 21:21:44 +00:00
Daniel James
dda32a279a Move the hash limits workaround into its own file.
[SVN r53159]
2009-05-21 21:21:11 +00:00
Daniel James
814476afa2 Fix float support on vxWorks.
Thanks to Dustin Spicuzza. Refs #2957

[SVN r52481]
2009-04-19 09:17:18 +00:00
Daniel James
b0b7f17984 Update copyright dates in hash and unordered.
[SVN r51667]
2009-03-09 20:56:23 +00:00
Daniel James
342284f4cf Remove deprecated headers.
Fixes #2412.

[SVN r51646]
2009-03-08 09:45:30 +00:00
Daniel James
fe6449fea6 Move hash_fwd into the hash subdirectory.
I should have done this in the last release. But now all of the hash
implementation is in the hash subdirectory.

[SVN r51645]
2009-03-08 09:45:11 +00:00
Daniel James
0480bcf503 Rename parameter to avoid Visual C++ warning about clash with boost::array.
Fixes #2643

[SVN r50514]
2009-01-08 13:37:33 +00:00
Daniel James
058c541da1 Move hash detail headers out of boost/functional/detail.
[SVN r49661]
2008-11-09 12:03:45 +00:00
Daniel James
d9fd6a499d Slightly more accurated comment - now that the headers cause errors, they've
moved past the deprecation stage (I think).


[SVN r49541]
2008-11-02 22:32:00 +00:00
Daniel James
3f1cbcd762 Changed the warnings in the deprecated headers from 1.34.0 to errors. These
will be removed in a future version of Boost (probably 1.39.0).



[SVN r49340]
2008-10-15 10:26:55 +00:00
Daniel James
b1b9907efd 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
55acb6d733 Merge new changes to unordered & hash.
- Unordered tests can run lightweight test or Boost.Test (at least
   theoretically).
 - Workaround Open BSD's incorrect numeric_limits.
 - Move the hash extensions in their own file.
 - Various small improvements to the unordered docs.
 - Fix some unordered examples.

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


[SVN r43838]
2008-03-24 17:03:15 +00:00
Daniel James
56714cf282 Merged revisions 42882-42941 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r42887 | danieljames | 2008-01-20 21:32:04 +0000 (Sun, 20 Jan 2008) | 10 lines
  
  Merged revisions 42590-42664,42667-42697,42699-42723,42725-42855,42857-42881 via svnmerge from 
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r42881 | danieljames | 2008-01-20 17:37:21 +0000 (Sun, 20 Jan 2008) | 1 line
    
    Include <new> to get std::bad_alloc.
  ........
................
  r42892 | danieljames | 2008-01-21 13:03:16 +0000 (Mon, 21 Jan 2008) | 1 line
  
  On some compilers the Rogue Wave/Apache stdcxx library doesn't have the normal std::distance, but instead has a variant that takes the result as the third parameter so it doesn't have to work out the type from the iterator.
................
  r42893 | danieljames | 2008-01-21 13:07:58 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Fix a typo in the last commit.
................
  r42895 | danieljames | 2008-01-21 13:33:29 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Remove tabs from the last checkin.
................
  r42896 | danieljames | 2008-01-21 15:51:40 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Use Boost config to tell when we have a std::distance function. Also, no need for a macro.
................
  r42908 | danieljames | 2008-01-21 21:37:04 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Use boost::long_long_type and boost::ulong_long_type.
................
  r42921 | danieljames | 2008-01-23 11:43:35 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Remove some tabs.
................
  r42922 | danieljames | 2008-01-23 11:46:28 +0000 (Wed, 23 Jan 2008) | 2 lines
  
  Add missing include. Refs #1596
................
  r42923 | danieljames | 2008-01-23 11:52:47 +0000 (Wed, 23 Jan 2008) | 2 lines
  
  Always use void const* for the second parameter of allocate. Refs #1596.
................
  r42936 | danieljames | 2008-01-23 22:22:16 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Use Boost style library name in the documentation.
................
  r42937 | danieljames | 2008-01-23 22:22:32 +0000 (Wed, 23 Jan 2008) | 1 line
  
  More tabs.
................
  r42941 | danieljames | 2008-01-23 23:35:01 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Fix all the allocators.
................


[SVN r42943]
2008-01-23 23:39:59 +00:00
Daniel James
793b9f5eeb Try to only issue deprecation warnings on compilers that support them.
[SVN r40206]
2007-10-20 10:31:58 +00:00
Daniel James
558f92f421 Fix the deprecated warnings on Borland, should also check before using #warning.
[SVN r40180]
2007-10-19 09:55:10 +00:00
Daniel James
2e6da0ab6d Sun C++ didn't like the function call, so just try inlining the implementation for now.
[SVN r40036]
2007-10-14 21:52:12 +00:00
Daniel James
81a2c42496 Use a pragma for warnings in Visual C++.
[SVN r39991]
2007-10-13 21:50:05 +00:00
Daniel James
cc8d3636e8 Add support for complex numbers to Boost.Hash
[SVN r39983]
2007-10-13 18:34:25 +00:00
Daniel James
ce6543623e New attempt at fixing the function pointer hash on the Sun compilers.
I think I was barking up the wrong tree - it could be that when calling
hash_value with a function pointer the compiler was choosing the
hash_value(bool) overload over the hash_value(T*) overload, so instead I'm
trying to call the correct one by giving it a template parameter. Another
alternative would be to calculate the hash function inside boost::hash.

Unfortunately, if I'm right, this means that other calls to hash_value will go
wrong for function pointers.


[SVN r39972]
2007-10-13 16:34:09 +00:00
Daniel James
26dc8abf25 Fix my botched attempt at supporting function pointers on Sun's compilers.
Also, now only applies the workaround to function pointers, non-function
pointers are treated as before. I might need to apply the special case to
member function pointers as well.


[SVN r39960]
2007-10-12 11:58:34 +00:00
Daniel James
f637c9e8ce Try to fix function pointer hashing for the sun compiler. A bit of a stab in
the dark.


[SVN r39935]
2007-10-11 17:12:24 +00:00
Daniel James
48c2728dd5 Add proper support for long longs and unsigned long longs.
[SVN r39014]
2007-08-27 18:16:54 +00:00
Daniel James
f15ea62785 Add extra overloads for hash_value to cover all the specializations of boost::hash. Fixes 1095
[SVN r38881]
2007-08-24 01:44:15 +00:00
Daniel James
33643fd6b3 Update the copyright in the hash library.
[SVN r38876]
2007-08-24 01:05:36 +00:00
Daniel James
aa7a824c6d Copy hash library from 1.34.1 over trunk.
For the first merge with the release branch, I only want to include some of the
changes I've been working on (fixes and some trivial changes), so I'm starting
again from 1.34.1.


[SVN r38873]
2007-08-24 00:42:19 +00:00
nobody
4e59762347 Add some missing 'inline's.
[SVN r38564]
2007-08-10 11:08:19 +00:00
nobody
fbe0c3eeca Add overloads of hash_value for more built in types. They're not strictly
needed and aren't in the original specifiction but they avoid a warning. See
ticket #1095 for details.


[SVN r38563]
2007-08-10 10:32:21 +00:00
Daniel James
d25ca5a376 Put the borland workarounds back - it still seems to need them. Will probably
have to do something else on top of this for any problems this causes.


[SVN r37803]
2007-05-27 09:28:50 +00:00
Daniel James
27d2c57873 Update copyright on hash headers.
[SVN r37801]
2007-05-27 09:07:09 +00:00
Daniel James
4ef5d0d98c Full namespace for std::size_t.
[SVN r37779]
2007-05-25 23:58:33 +00:00
Daniel James
555fefae20 Try turning off a borland workaround in the new version of borland, as it
seems to be causing problems in the tests.


[SVN r37426]
2007-04-12 20:33:48 +00:00
Daniel James
9430503530 Move the hash extensions into their own header, which hopefully makes the
extension implementation a little clearer. It also fixes a problem where the
visual C++ include once pragma was preventing the extensions from being loaded
on the second include.


[SVN r35314]
2006-09-24 20:00:47 +00:00
Daniel James
311bf0d6c5 The Digital Mars workarounds aren't required for the latest version.
[SVN r34510]
2006-07-12 10:13:45 +00:00
Daniel James
572d82713b Update copyright details.
[SVN r34390]
2006-06-25 09:59:05 +00:00
Daniel James
a4b51721db Oops again, I checked in the wrong version of hash.hpp, which had a broken
version of boost::hash_value<complex> in it. So fix that.


[SVN r34207]
2006-06-06 20:51:24 +00:00
Daniel James
3b29b95b8e Add support for long long to Boost.Hash.
[SVN r34202]
2006-06-06 20:13:33 +00:00
Daniel James
e4b7765da1 Workaround for Visual C++ 7.
[SVN r34191]
2006-06-06 08:14:23 +00:00
Daniel James
f3e6c4e96a Hash workarounds for Digital Mars.
[SVN r33958]
2006-05-07 17:52:38 +00:00
Daniel James
e592b7f057 Update the copyright comments in the hash headers.
[SVN r33370]
2006-03-18 15:54:53 +00:00
Daniel James
d11d2dd17a Reintroduce workaround for hashing const built-in array on Visual C++.
[SVN r33164]
2006-02-28 00:49:14 +00:00
Daniel James
17d5f71c35 Remove TODO note to self.
For the record: I removed the overload because it was causing an ambiguity that I was too lazy to work out at the time. It turned out this was because wchar_t was defined as unsigned short - using BOOST_NO_INTRINSIC_WCHAR_T was the right way to deal with this so the overload no longer needs to be disabled.


[SVN r33114]
2006-02-26 15:58:37 +00:00
Daniel James
a332300682 Fix a typo in the workaround code for compilers without partial specialization.
[SVN r33104]
2006-02-25 15:17:01 +00:00
Daniel James
5fdfe5d328 Add support for the BOOST_HASH_NO_EXTENSIONS macro.
[SVN r32900]
2006-02-13 18:21:20 +00:00
Daniel James
514757c312 Hold your nose, it's a Visual C++ 6.5 workaround. For some reason it requires
boost::hash to define operator() taking const and non-const arguments.


[SVN r32783]
2006-02-09 19:11:54 +00:00
Daniel James
1d5bfbcc9c Since all the hash functions are now declared in a single header, there's no
need for the call_hash hack on compliant compilers. So only use it on
compilers where it's needed.


[SVN r32781]
2006-02-09 19:10:03 +00:00
Daniel James
19564252b4 Move all the boost/functional/hash/*.hpp files into a single file
(hash/hash.hpp for now, but will eventually move into hash.hpp), add warnings
that the old headers are deprecated.


[SVN r32778]
2006-02-09 18:57:07 +00:00
Daniel James
b2be632311 Move include errorno & limits from hash.hpp into hash_float where they should be.
[SVN r32777]
2006-02-09 18:55:35 +00:00
Daniel James
81483cc533 Move the float hash function into its own header.
[SVN r32594]
2006-02-05 19:51:29 +00:00
Daniel James
b922722090 Use BOOST_WORKAROUND in boost/functional/hash/hash.hpp
[SVN r32589]
2006-02-05 16:31:45 +00:00
Daniel James
da55a4fcca Use hash_fwd.hpp in the main hash header.
[SVN r32588]
2006-02-05 16:27:19 +00:00
Daniel James
ed548575d4 Use container_fwd.hpp for the hash functions.
[SVN r32583]
2006-02-05 14:44:24 +00:00
Daniel James
74ec71fe8d Check errno after calling frexp - this is pretty slow and unecessary on most platforms, but this close to release it seems better to be over cautious.
[SVN r29255]
2005-05-28 12:10:33 +00:00
Daniel James
8090093f06 Initialise the exponent before calling frexp in the hash float function.
[SVN r29200]
2005-05-26 07:36:26 +00:00
Daniel James
7092068156 Another attempt at getting the hash array tests to pass on Borland.
[SVN r28390]
2005-04-21 22:20:43 +00:00
Daniel James
f2afc2a08d Another fix for the Borland hash array code, and get rid of my attempt at working around Borland problems with infinity and NaN in the hash float functions. It seems impossible to do anything with them.
[SVN r28286]
2005-04-17 09:09:42 +00:00
Daniel James
7223c8da60 Remove workaround for bug in gcc 4.0 which appears to have been fixed.
[SVN r28282]
2005-04-16 16:59:30 +00:00
Daniel James
72cd8cdaa1 Overload hash_value for non-constant arrays.
[SVN r28276]
2005-04-16 10:32:29 +00:00