Giuseppe D'Angelo b694ada294 Do not memset(0) POD types
"POD" is the wrong type trait to determine if something can be safely
zero-filled in order to achieve zero initialization. Consider a type
like

  struct POD { int POD::*ptr; };

This is a POD; its value initialization needs to value initialize the
member, and since it's a pointer, that's zero initialization, and that's
setting the pointer to null.

On Itanium, a null pointer to data member is not zero filled; it actually
has the value -1u.

Hence, zero-filling via memset(0) a POD object like the one above is
erroneous. Unfortunately there is no type trait in C++ that we can use to
know if a given datatype can be value initialized by zero-filling -- we
can check for trivial constructability, but that's a necessary
condition, not a sufficient one (POD above is also trivially
constructible).

The test is disabled on MSVC because of a compiler bug.

Fixes #238
2023-02-02 11:29:53 +01:00
2021-01-21 19:30:35 +00:00
2017-05-22 10:47:07 +02:00
2023-02-02 11:29:53 +01:00
2023-01-23 14:22:41 +01:00
2023-02-02 11:29:53 +01:00
2021-01-21 19:30:35 +00:00
2014-05-28 15:50:13 +02:00
2018-06-26 21:50:16 +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.
S
Description
STL-like containers from Boost
Readme
11 MiB
Languages
C++ 91.6%
C 8.3%