diff --git a/include/boost/utility/typed_in_place_factory.hpp b/include/boost/utility/typed_in_place_factory.hpp index f5de755..347b7f4 100644 --- a/include/boost/utility/typed_in_place_factory.hpp +++ b/include/boost/utility/typed_in_place_factory.hpp @@ -54,8 +54,8 @@ public: void* apply (void* address, std::size_t n) const { - for(char* next = address = this->apply(address); !! --n;) - this->apply(next = next+sizeof(T)); + for(void* next = address = this->apply(address); !! --n;) + this->apply(next = static_cast(next) + sizeof(T)); return address; }