Commit Graph

112 Commits

Author SHA1 Message Date
Marshall Clow
d3eb4faf0c Fix some warnings from gcc - https://github.com/boostorg/dynamic_bitset/issues/19 2018-01-31 11:11:12 -08:00
Daniela Engert
5b39db5ba0 squash compiler warnings due to wrong order of type-cast and integral type promotion
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-05-25 10:29:34 +02:00
Edward Diener
0ead484c37 Implemented lexigraphic compare when bitsets have different lengths. 2017-05-17 20:59:08 -04:00
Edward Diener
dbfce8e174 Allow different sized bitsets to be compared for <, >, <=, >= 2017-05-15 13:03:15 -04:00
Daniela Engert
572e9d78ff fix wrong parameter type in constructor of dynamic_bitset::reference
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-03-18 13:49:16 +01:00
Seth Heeren
91895380c6 Add optional serialization support
This implemenents non-intrusive serialization support to dynamic_bitset<> based on Boost Serialization

 - it supports archives that require named elements
 - it gets private member access using a nested friend class (to decouple the interface entirely)
 - relies on boost/serialization/vector.hpp for actual implementation
2017-01-09 03:19:57 +01:00
ricky65
340822f979 Add capacity(), reserve(), and shrink_to_fit(). 2015-06-03 22:45:16 -07:00
Marshall Clow
225064d355 Patch by Riccardo Marcangelo: Added a pop_back() member function which decreases the size of the bitset by one 2014-09-15 08:29:05 -07:00
Glen Fernandes
083c5e6214 Use non-deprecated macro for r-value reference support detection 2014-05-19 17:41:50 -07:00
Glen Fernandes
18eb52ecee Add noexcept specifications 2014-05-19 17:39:39 -07:00
Glen Fernandes
a3ea40d932 Support C++11 minimal allocators 2014-05-19 17:38:23 -07:00
Ahmed Charles
dd7cdc794e Merge branch 'master' into develop 2014-05-17 16:32:16 -06:00
Ahmed Charles
10195375ed Fix lacking include in previous pull request. 2014-05-17 16:30:18 -06:00
Boleslaw Ciesielski
ba0ba59f24 Add support to dynamic_bitset for compiling with exceptions disabled by using BOOST_TRY/BOOST_CATCH.
This applies the patch from bug https://svn.boost.org/trac/boost/ticket/9939
2014-05-16 12:05:43 -04:00
Thomas Klausner
bcc384b604 Fix implicit conversion changes signedness problems.
clang-3.5 trunk 201163 and OS X's clang (not sure which version)
report -Wsign-conversion warnings with this header. This patch fixes
them.

https://svn.boost.org/trac/boost/ticket/9725

Signed-off-by: Thomas Klausner <tk@giga.or.at>
2014-05-16 16:38:38 +02:00
Ahmed Charles
f34a8a4b23 Fix broken build due to addressof() not being included on some platforms. 2014-03-04 12:21:31 -08:00
Ahmed Charles
d19aeced56 Add test_set() (#6164). 2014-03-01 18:19:54 -08:00
Ahmed Charles
1b880102fe Add all() (#8445).
Includes test cases.
2014-03-01 18:11:59 -08:00
Ahmed Charles
86b177d3ee Add support for move constructors in C++11 (#6947). 2014-03-01 18:06:19 -08:00
Ahmed Charles
4c6825716f Fix MSVC warnings (#9621). There should be no behavior change. 2014-03-01 17:56:52 -08:00
Ahmed Charles
ac0baa94ee Whitespace changes. 2014-03-01 17:43:44 -08:00
Alexey Stukalov
0a1621f0e7 simplify dynamic_bitset::find_next()
Instead of masking all bits in the current block that were already
visited and then finding the lowest remaining bit, it shifts the current
block directly to the first unvisited bit and identifies the lowest
set bit.
It requires fewer operations that the original implementation and should
be faster.

See https://svn.boost.org/trac/boost/ticket/5159.
2014-03-01 17:26:39 -08:00
Ahmed Charles
cccd1f74dc Fix MSVC warning about mismatched sizes. 2014-02-18 22:04:43 -08:00
Ahmed Charles
71a5cc6eeb Rename variable to make slightly more sense. 2014-02-18 21:49:59 -08:00
Ahmed Charles
c9fa6dbdd1 Fix spelling mistake. 2014-02-18 21:46:27 -08:00
Marshall Clow
d6f1835fbb Applied patch; Refs #5439
[SVN r71505]
2011-04-26 14:41:50 +00:00
Steven Watanabe
59e99b9b45 Use the correct variable type to save the result of count_extra_bits(). Fixes #4022.
[SVN r62898]
2010-06-13 04:36:50 +00:00
Steven Watanabe
f199a7f006 Cast an anonymous enum to bool. Fixes #4025.
[SVN r62897]
2010-06-13 04:23:35 +00:00
Daniel James
5c79c20827 Merge dynamic bitset from release.
I think the recent changes in trunk and release were for the same problem. But
I'm not sure so I've merged them together. Hopefully, the release branch might
fix the Intel C++ errors as well.

------------------------------------------------------------------------
r52960 | dgregor | 2009-05-13 07:11:03 +0100 (Wed, 13 May 2009) | 1 line

Use enum constants rather than local variables for integral constants. Should fix dynamic_bitset failures on GCC 4.3.x
------------------------------------------------------------------------



[SVN r53050]
2009-05-16 14:58:33 +00:00
Hartmut Kaiser
ed32df5ad2 Minor comment edit
[SVN r52881]
2009-05-10 16:59:27 +00:00
Hartmut Kaiser
da0b582703 Fixing the fix by taking into account __GNUC_PATCHLEVEL__ as well
[SVN r52880]
2009-05-10 16:55:07 +00:00
Hartmut Kaiser
622c8d8fd5 Applying patch fixing problem on certain patch levels for gcc.4.3.3/Ubuntu
[SVN r52879]
2009-05-10 16:52:14 +00:00
Gennaro Prota
59825bc8db dynamic_bitset:
* removed use of BOOST_WORKAROUND in #if for gcc bug c++/8419, as recent
      changes to the implementation of BOOST_WORKAROUND broke its usage with
      arguments such as ( (__GNUC__) * 100 * 100 + (__GNUC_MINOR__) * 100 )


[SVN r49586]
2008-11-04 16:52:00 +00:00
Gennaro Prota
c298ba0c5f dynamic_bitset:
always provide a definition for static data members of const integral type

[SVN r49433]
2008-10-22 15:47:27 +00:00
Gennaro Prota
e953b16cee dynamic_bitset:
* removed one of the workarounds for VC++ <= 7.0 (we don't run tests on
      those compilers, anymore, so we don't really know if the library still
      works with them); other such workarounds exist, though: removing them
      involves heavy refactoring and is probably not worth the corresponding
      risk of destabilization; comments have been added about this latter point

    * comment fixes in detail/dynamic_bitset.hpp


[SVN r49345]
2008-10-15 12:33:37 +00:00
Gennaro Prota
180aa15c44 dynamic_bitset: in reference constructor, assert() before it is (eventually) too late!
[SVN r48730]
2008-09-11 09:46:54 +00:00
Gennaro Prota
f6ce97de67 dynamic_bitset: added spaces in the definition of BOOST_dynamic_bitset_is_numeric (detail/dynamic_bitset.hpp), to avoid getting an unintended alternative token "<:" when invoking the macro with argument "::boost::[u]long_long_type"
[SVN r48664]
2008-09-08 10:20:49 +00:00
Gennaro Prota
7530a40476 dynamic_bitset: changed a using directive to a set of using declarations, in the hope that this will fix regressions of Intel and others; (very minor) changed comment text
[SVN r48663]
2008-09-08 10:10:02 +00:00
Gennaro Prota
c05a47b50d dynamic_bitset:
* added user-declared default constructor to value_to_type<bool> (yeah, the
      usual "initializing a const instance of an empty class" problem, which
      also affected S. Meyers' null)
    * explicitly qualified occurrence of "bits_per_block" in count() member
      function, to let gcc 3.4.x understand that it *is* a constant expression
    * fixed namespace qualification for vector_max_size_workaround (should've
      been done in the previous commit, sorry)


[SVN r48496]
2008-08-31 11:53:45 +00:00
Gennaro Prota
d09c7d2180 dynamic_bitset:
* fixed form of some remaining copyright lines
    * using namespace detail::dynamic_bitset_impl for *all* implementation
      details (dynamic_bitset_*count*_impl removed) and consequently shortened
      some entity names
    * switched from enum to bools for "enum mode", to help several compilers
      which show problems with recognizing access_by_bytes and access_by_blocks
      as constant expressions
    * minor comment changes
    * implemented the do-the-right-thing dispatch for constructor from
      iterator-range, a la standard sequence containers (feature request #2172)
    * dropped now useless comparison with zero in reference constructor

NOTE:
    updated tests and documentation not committed yet; let's wait for the trunk
    results first


[SVN r48478]
2008-08-30 18:00:30 +00:00
Gennaro Prota
d80a9dbdf8 dynamic_bitset: tentative code reworking in count() member function, to help gcc 3.4.6 on Sandia-sun, which seems to have troubles with a simple constant expression of enumeration type (see <http://www.boost.org/development/tests/trunk/developer/dynamic_bitset_.html>)
[SVN r48280]
2008-08-21 11:49:12 +00:00
Gennaro Prota
15b61f694a dynamic_bitset:
* clean up and fix of copyright notices for the include files that are directly under boost/
    * parenthesized a couple of macro names in boost/dynamic_bitset/config.hpp
      (yeah, a bit paranoid, I know :-))
    * removed some superfluous comments and enclosed an url in angle brackets
    * changed block_width_type, to avoid a few level 4 warnings with MSVC++
    * added the usual private-and-non-implemented copy members to bit_appender
    * removed useless #pragma warning(disable:4996) for MSVC++ (it should have
      been eventually applied to much more places than it was; and, anyhow, the
      only sensible way to get rid of the warning is to disable it globally)
    * slight tweak in to_ulong (assert moved a bit earlier)


[SVN r48252]
2008-08-20 11:16:16 +00:00
Gennaro Prota
eef25927d7 integer_log2.hpp and lowest_bit.hpp, in boost/pending/: little comment cleanup (svn anchors, etc.); added a static_cast<> to silence (harmless) MSVC++ warnings
[SVN r48251]
2008-08-20 11:06:23 +00:00
Gennaro Prota
aa6053121c dynamic_bitset: cleaner implementation of to_ulong (which should also avoid some warnings on 64-bit implementations)
[SVN r47401]
2008-07-13 19:38:48 +00:00
Gennaro Prota
5d66eda2ac dynamic_bitset: removed svn keywords and anchors; removed useless "see ... for documentation" pointers; fixed copyright notices and made all "comment headers" consistent; cleaned up trailing whitespaces
[SVN r47392]
2008-07-13 19:08:31 +00:00
Boris Gubenko
717fb80e40 compute 'result' in to_ulong() as it is done in Boost 1.34
[SVN r41778]
2007-12-06 10:47:52 +00:00
Frederick Akalin
41e1f468d3 added pragma to shut up warning for std::fill_n
[SVN r35066]
2006-09-11 02:23:00 +00:00
Gennaro Prota
60375651d9 identification
[SVN r34905]
2006-08-19 11:04:25 +00:00
Gennaro Prota
50ffc7be59 (minor) oops in previous edit
[SVN r34904]
2006-08-19 10:55:07 +00:00
Gennaro Prota
02f4b61f14 identification
[SVN r34903]
2006-08-19 10:52:24 +00:00