Juan Carlos Arevalo Baeza (JCAB) 18f29c6eda Fix all instances of MSVC warning C4146 (unsigned negation)
Unsigned negation is a well-defined operation in C and C++ and it is commonly used when doing bit manipulation of unsigned integers, because it builds a high-pass bitmask.

For instance, if `X` is known to be a power of two, `-X` is precisely the mask needed to align a value down to a multiple of `X` by means of a bit-wise `&` operation.

However, it can occasionally be flagging a bug, when the original intent was mathematical negation. For this reason, an explicit fix is preferred to suppressing this warning.

This change fixes all the instances of unsigned negation of the form `-X` to `0 - X`.

It also includes a drive-by spot-fix for the macro `left_bits(x)` whose parameter was missing the usual parenthesis. This was benign in all the uses of the macro.
2025-07-30 15:35:34 -07:00
2021-01-21 19:30:35 +00:00
2025-07-07 23:41:45 +02:00
2021-01-21 19:30:35 +00:00
2024-08-23 23:53:14 +02:00
2014-05-28 15:50:13 +02:00
2021-11-18 11:40:54 -05:00

Boost.Container

Boost.Container, part of collection of the Boost C++ Libraries, implements several well-known containers, including STL containers. The aim of the library is to offer advanced features not present in standard containers, to offer the latest standard draft features for compilers that don't comply with the latest C++ standard and to offer useful non-STL containers.

License

Distributed under the Boost Software License, Version 1.0.

Properties

  • C++03
  • Mostly header-only, library compilation is required for few features.
  • Supports compiler modes without exceptions support (e.g. -fno-exceptions).

Build Status

Branch Travis Appveyor Coverity Scan codecov.io Deps Docs Tests
master Build Status Build status Coverity Scan Build Status codecov Deps Documentation Enter the Matrix
develop Build Status Build status Coverity Scan Build Status codecov Deps Documentation Enter the Matrix

Directories

Name Purpose
doc documentation
example examples
include headers
proj ide projects
test unit tests

More information

  • Ask questions
  • Report bugs: Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
  • Submit your patches as pull requests against develop branch. Note that by submitting patches you agree to license your modifications under the Boost Software License, Version 1.0.
  • Discussions about the library are held on the Boost developers mailing list. Be sure to read the discussion policy before posting and add the [container] tag at the beginning of the subject line.
Description
Mirrored via gitea-mirror
Readme 12 MiB
Languages
C++ 92%
C 7.8%
CMake 0.2%