Boost logo

Boost :

Subject: [boost] boost/pool/pool.hpp why reinterpret_cast instead of static_cast?
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2009-03-09 09:53:13


In the file there's
the following code:

struct default_user_allocator_malloc_free


  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?


Boost list run by bdawes at, gregod at, cpdaniel at, john at