Commit Graph

234 Commits

Author SHA1 Message Date
Glen Fernandes
ec67130557 Correct include order 2019-08-29 04:04:09 -04:00
Glen Fernandes
4403017952 Rewrite factory and value_factory
- Support r-value arguments
- Use variadic templates for arbitrary arguments
- Support allocators that are final
- Support allocators that use fancy pointers
- Support environments with disabled exceptions
- Improve compilation times
2019-08-27 06:55:37 -04:00
Daniel James
16a4ab6de6 Remove hash from repo 2017-12-22 20:10:37 +00:00
Daniel James
173aa87c21 Manually write out tuple overloads
A tad more usable this way.
2017-12-19 17:48:48 +00:00
Daniel James
5f9b5bcfad Update paths for headers moved to different modules
Makes it easier to see dependencies.
2017-12-19 17:48:18 +00:00
Daniel James
3697941e27 Call 'make_pointer' outside of try, catch block
If an exception is thrown in the constructor of a smart pointer,
then the smart pointer should handle deallocating the memory.
If this was inside the try block, then the catch block would
deallocate the memory a second time.
2017-12-17 12:47:03 +00:00
Daniel James
b378d0336c Use allocator_traits::construct and destroy 2017-12-17 12:47:03 +00:00
Daniel James
3dc4f33ad5 Don't call deallocate with null pointers 2017-12-17 12:16:08 +00:00
Daniel James
65a6556800 Use alloator_traits for allocate/deallocate 2017-12-17 12:05:54 +00:00
Daniela Engert
4a6944adbc
replace members of std::allocate which are deprecated in c++17 by their cousins from std::allocator_traits.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-12-17 09:59:59 +01:00
Daniel James
995370c904 Use is_zero workaround on clang
The same warning appears on clang for windows, but the workaround wasn't
used because the gcc macro wasn't defined.
2017-09-19 12:42:01 +01:00
Daniel James
767673645e Support for char16_t, char32_t, u16string, u32string 2017-05-31 22:19:54 +01:00
Daniel James
33eb0c50dc Initial support for char32_t 2017-05-31 10:17:34 +01:00
Daniel James
f230731aa5 Only support std::wstring when wchar_t is available
This hopefuly fixes #8552.

https://svn.boost.org/trac/boost/ticket/8552
2016-11-18 15:13:46 +00:00
Daniel James
281e11b292 Support for removed function objects in C++17
std::unary_function and std::binary_function are removed in C++17, and
Visual C++ is the first compiler to do this (when the appropriate macro
is defined). I'm not sure what the long term solution should be, but
hopefully this will work for now.
2016-11-01 16:31:21 +00:00
Daniel James
9f24e2eaf0 Try to avoid more warnings 2016-10-11 10:07:11 +01:00
Daniel James
826f7013a1 Another signed conversion warning 2016-10-05 09:49:27 +01:00
Daniel James
100e78f560 Fix signed conversion warnings. 2016-09-30 09:25:44 +01:00
Daniel James
2ee1e5c25a Merge branch 'develop' (early part) 2016-06-26 20:32:22 +01:00
Marshall Clow
7977f83a08 Fix a typo in a comment; fixes https://svn.boost.org/trac/boost/ticket/12270 2016-06-14 17:24:30 -07:00
Daniel James
a43bbfe34c Fix handling of no argument functions in C++11.
When they don't exist it was failing because result_of doesn't have a
type and SFINAE couldn't be used as they have no template arguments.
2016-05-27 08:38:01 +01:00
Daniel
45eeb170f2 Fix the binary 32 and 64 bit hash functions. 2016-02-28 09:14:37 +00:00
Billy Donahue
2a0d1be60b doc: BOOST_HASH_SPECIALIZE_REF passes by const ref 2015-09-12 17:12:02 -04:00
Daniel James
188c8d4c5d Change default factory allocator to 'void'.
To remove the dependency on Boost.Optional. Supplied a macro for
backwards compatibility, but that will be removed in a future release.
2015-01-10 13:08:03 +00:00
Andrzej Krzemieński
28796cd2db removed unused header
this decouples this library from Boost.Optional
2015-01-05 19:36:57 +00:00
Andy Webber
d5dc5033d2 Fixed strict aliasing violation.
Changed C-style cast and dereference to std::memcpy.  Exactly mirrors other code already in the file.
2015-01-05 19:35:34 +00:00
Daniel James
64e85476f1 Another try at an improved hash function.
This is based on the mix function from MurmurHash. It's not the full
algorithm as it's always seeded with 0, and doesn't do a final mix. This
should be okay as Boost.Hash doesn't claim to avalanche the bits.
2014-02-23 10:17:08 +00:00
Daniel James
c965760ea1 Improved(?) hash function.
Given the existing interface, it's quite tricky to use most popular hash
functions without a change, so I'm using a modified version of FNV1a.
The current function always starts with a seed of 0 (and will in user
functions), so I'm adding the offset each time instead. I'm not sure if
that will work as well.
2014-01-28 23:33:25 +00:00
Stephen Kelly
e961a8a2f8 Functional: Remove obsolete MSVC version checks.
[SVN r86051]
2013-12-10 23:41:55 +00:00
Daniel James
fb01de460f Use BOOST_HAS_PRAGMA_ONCE.
Remembering to first include config, so that it'll actually be defined.

[SVN r86726]
2013-12-10 23:41:13 +00:00
Stephen Kelly
9cd62829ee 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-12-10 23:40:59 +00:00
Daniel James
b5e6678553 Revert changes to develop branch.
Simplest way to merge to master.
2013-12-10 23:18:52 +00:00
Daniel James
612861ab0d 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
Daniel James
3f4d17c5e7 Only use Visual C++ pragma for appropriate versions.
[SVN r86671]
2013-11-12 22:09:42 +00:00
Stephen Kelly
dd73970b1e Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#else...#endif blocks.

[SVN r86245]
2013-10-11 23:17:48 +00:00
Stephen Kelly
3ac96347ba Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#endif blocks.

[SVN r86243]
2013-10-11 23:13:10 +00:00
Daniel James
92e607de34 Simplify SFINAE for largest float overload. Refs #8822.
I accidentally missed it out. Also fix the return values.

[SVN r86172]
2013-10-06 08:02:35 +00:00
Stephen Kelly
6d25b771bd Functional: Remove obsolete GCC version checks.
[SVN r86112]
2013-10-01 08:46:45 +00:00
Stephen Kelly
e887c416a6 Functional: Remove obsolete MSVC version checks.
[SVN r86051]
2013-09-30 11:22:29 +00:00
Stephen Kelly
29d7468979 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
b1790e463e Fix Visual C++ warning in hash. Refs #8568.
I changed this a little from the patch on #8568. I moved the pragmas to the
start and end of the file because I don't like to little the body of the code
with them (this does mean I've disabled a potentially useful warning, but the
code is pretty stable nowadays).

I also removed the version checks, as the warning should be present in later
versions.


[SVN r85248]
2013-08-08 22:01:18 +00:00
Daniel James
670e7b3736 Simpler test for appropriate floats for binary hashing. Refs #8822.
No idea if this will actually fix it.

[SVN r85246]
2013-08-08 20:30:04 +00:00
Thomas Heller
7cc6744ff6 Fixing UB by using memcpy instead of old style cast
[SVN r82218]
2012-12-27 10:49:19 +00:00
Daniel James
75ffe88f82 Hash: Fix int128 with BOOST_HASH_NO_EXTENSIONS.
I don't think int128 should count as an extension.

BOOST_HASH_NO_EXTENSIONS is actually a bit of a pain, and I don't think it's
that useful. Maybe I should deprecate it.

[SVN r81870]
2012-12-12 09:44:32 +00:00
Daniel James
f572834b59 Hash: Fix int128 support.
[SVN r81854]
2012-12-11 15:48:19 +00:00
Daniel James
5fcfd1ae38 Hash: Support boost::int128_type.
[SVN r81816]
2012-12-10 10:40:44 +00:00
Daniel James
8a0c516b22 Hash: Detab.
[SVN r81787]
2012-12-08 09:19:24 +00:00
Daniel James
407df60e3e Hash: Remove container_fwd_0x.hpp
[SVN r81678]
2012-12-02 21:12:24 +00:00
Daniel James
2380fd919e Hash: Don't use workarounds with recent compilers. #7221, #7470
[SVN r81677]
2012-12-02 21:11:45 +00:00
Marshall Clow
89fd55fa96 Removed missed usage of deprecated macros in Boost.Functional
[SVN r81578]
2012-11-26 21:45:20 +00:00