
12 Mar
2009
12 Mar
'09
1:44 p.m.
Philippe Vaucher wrote:
In the file https://svn.boost.org/trac/boost/browser/trunk/boost/pool/pool.hpp there's the following code:
static char * malloc(const size_type bytes) { return reinterpret_cast<char *>(std::malloc(bytes)); }
It is my understanding that void* to T* convertions should be done using static_cast and not reinterpret_cast. Is there a reason for using reinterpret_cast there?
Good question. I also think it should be static_cast<char*>. HTH, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center