#2941 closed Tasks (fixed)
boost/pool/pool.hpp uses reinterpret_cast instead of static_cast
Reported by: | philippe.vaucher | Owned by: | Chris Newbold |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | pool |
Version: | Boost 1.38.0 | Severity: | Optimization |
Keywords: | reinterpret_cast static_cast | Cc: |
Description
In pool.hpp there's a lot of reinterpret_cast usage like so:
static char * malloc(const size_type bytes) { return reinterpret_cast<char *>(std::malloc(bytes)); }
This is a case where static_cast should be used instead. reinterpret_cast is known to yield implementation specific behavior.
Note:
See TracTickets
for help on using tickets.
(In [62705]) Use static_cast instead of reinterpret_cast. Fixes #2941