Commit Graph

264 Commits

Author SHA1 Message Date
Peter Dimov
5ba74cd3a9 Update hash_value for pointers to handle the case when uintptr_t is larger than size_t 2022-07-03 23:35:46 +03:00
Peter Dimov
c14d3a1e2b Add a comment explaining why to_underlying isn't used in hash_value for enums 2022-07-03 21:08:14 +03:00
Peter Dimov
c28d0b813b Directly cast to size_t all integrals no wider than size_t 2022-06-26 01:25:45 +03:00
Peter Dimov
b8d315fac5 Update is_range, disable -Wvariadic-macros for GCC 2022-06-03 20:14:07 +03:00
Peter Dimov
866bd60dd3 Reject ranges that have themselves as their value_type (e.g. filesystem::path) 2022-06-03 19:52:03 +03:00
Peter Dimov
e04ca1f442 Match floating point hash values in 32 bit mode 2022-05-30 02:35:00 +03:00
Peter Dimov
0eada2ae93 Revert hash_combine for floats 2022-05-30 02:26:12 +03:00
Peter Dimov
943ef0ab82 Avoid -Wconversion with is_signed and enums 2022-05-30 02:19:54 +03:00
Peter Dimov
14f8934bff Revert integral hashing 2022-05-30 01:57:56 +03:00
Peter Dimov
f08204e29a Revert hash_value for std::complex 2022-05-29 21:59:17 +03:00
Peter Dimov
2424ada9f9 Bias integral values so that small integers hash to themselves even when having a wide type 2021-10-17 19:03:15 +03:00
Peter Dimov
aaa1f441ac GCC 32 bit under Windows has an 80 bit long double in 12 bytes, not 16 2021-10-17 16:17:44 +03:00
Peter Dimov
bb99a2b1ae Leave detail/limits.hpp a stub; update test 2021-10-17 08:15:10 +03:00
Peter Dimov
f05e8840d2 Remove float support files 2021-10-17 08:14:35 +03:00
Peter Dimov
dff8843bb2 Remove unnecessary include 2021-10-17 07:52:03 +03:00
Peter Dimov
15ae39e176 Implement floating point hashing inline in hash.hpp 2021-10-17 07:47:34 +03:00
Peter Dimov
39e4a4f184 Switch to type_traits/enable_if to eliminate the Core dependency 2021-10-17 07:10:47 +03:00
Peter Dimov
88fbad7438 Remove Borland workarounds 2021-10-17 04:00:10 +03:00
Peter Dimov
0737c56fec Move boost::hash into hash.hpp, delete specializations 2021-10-17 03:54:41 +03:00
Peter Dimov
2b9251069f Move std::tuple support to detail/hash_tuple.hpp 2021-10-17 02:40:29 +03:00
Peter Dimov
a63c85007f Move std::unique_ptr, std::shared_ptr support into hash.hpp 2021-10-17 02:14:19 +03:00
Peter Dimov
7a29dee42a Move std::pair support into hash.hpp 2021-10-17 02:11:51 +03:00
Peter Dimov
a0a6fa0616 Move std::complex support to hash.hpp 2021-10-17 02:03:50 +03:00
Peter Dimov
24598bd45f Take care of g++ warning on 4294967291 2021-10-17 00:47:28 +03:00
Peter Dimov
7f2a43226e Take care of size_t -> int warnings under g++ 4.8 2021-10-17 00:31:08 +03:00
Peter Dimov
9348a89fb4 Fix msvc-14.1 errors caused by their unconstrained stdext::hash_value overload (!) 2021-10-17 00:09:20 +03:00
Peter Dimov
3f2612d36e Update test/Jamfile, turn warnings-as-errors=on, fix g++ warning 2021-10-16 22:22:29 +03:00
Peter Dimov
3cf502b34c Add generic hash_value functions for ranges to hash.hpp, remove those from extensions.hpp 2021-10-16 22:12:31 +03:00
Peter Dimov
b2e3beea3f Remove unnecessary warning suppression 2021-10-16 21:02:28 +03:00
Peter Dimov
d308495a67 Add detail/is_unordered_range.hpp 2021-10-16 21:01:07 +03:00
Peter Dimov
00c837d523 Add detail/is_contiguous_range.hpp 2021-10-16 20:54:51 +03:00
Peter Dimov
415f2fafe2 Add detail/is_range.hpp 2021-10-16 20:44:32 +03:00
Peter Dimov
9bbedce029 Add missing include 2021-10-16 18:46:00 +03:00
Peter Dimov
2fc970b6ae Simplify hash_value for integrals 2021-10-16 17:29:02 +03:00
Peter Dimov
4e11c855cb Remove use of <functional> 2021-10-16 16:55:27 +03:00
Peter Dimov
bd379e1a46 Remove VMS workaround 2021-10-16 16:54:08 +03:00
Peter Dimov
b201ff97a8 Use Config macros for detecting C++17 headers 2021-10-16 16:43:11 +03:00
Peter Dimov
e89fe04479 Remove more BOOST_NO_FUNCTION_TEMPLATE_ORDERING workarounds 2021-10-16 16:26:42 +03:00
Peter Dimov
7ce3f759ec Remove __DMC__ workarounds 2021-10-16 16:24:56 +03:00
Peter Dimov
917ac6a88a Remove BOOST_HASH_CHAR_TRAITS 2021-10-16 16:22:33 +03:00
Peter Dimov
9782883434 Remove BOOST_NO_FUNCTION_TEMPLATE_ORDERING workarounds 2021-10-16 16:20:54 +03:00
Peter Dimov
f0ef7b8e84 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workarounds 2021-10-16 16:18:02 +03:00
Peter Dimov
21f2b5e1db Fix hash_combine_impl to only test for a specific bit width and not for concrete types 2021-10-12 19:52:37 +03:00
Marshall Clow
e0331c0bd4 Remove use of non-existant Boost.Config macro BOOST_NO_CXX11_HDR_MEMORY
Thanks to Jeff Trull for the catch.
2020-09-10 20:09:23 -07:00
Edward Diener
1818113f4c Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-23 11:50:36 -04:00
Andrey
5f858645a0 Removed usage of std::unary_function for C++17 compliance 2019-08-10 12:37:49 +03:00
Andrey
fd310d2706 Removed usage of std::unary_function for C++17 compliance 2019-08-10 11:59:22 +03:00
Andrey
90a0e36638 Removed usage of std::unary_function for C++17 compliance 2019-08-09 17:23:16 +03:00
Daniel James
83a874ed49 More general purpose support for iterators with odd reference type (trac #13501)
In the last release I added explicit support for `vector<bool>` which wasn't
working with libc++ because the iterator's `operator*` returned a proxy
reference type. Other implementations return a `bool` for const iterators, so
they happened to work okay.

This solves the problem in a more general purpose way by instantiating
`hash_combine` for the iterator `value_type`. So the type returned by
`operator*` will be implicitly casted to the correct type.
2018-04-15 22:44:33 +01:00
Daniel James
601b8d0378 Include vector header, needed to get the iterator type 2018-03-29 21:57:52 +01:00