Modify

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#2941 closed Tasks (fixed)

boost/pool/pool.hpp uses reinterpret_cast instead of static_cast

Reported by: philippe.vaucher Owned by: cnewbold
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.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by steven_watanabe

  • Resolution set to fixed
  • Status changed from new to closed

(In [62705]) Use static_cast instead of reinterpret_cast. Fixes #2941

comment:2 Changed 6 years ago by marshall

(In [67958]) Merging fixes to release; Fixes #2696; Refs #4346; Refs #2941; Refs #386

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cnewbold.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.