
Am Mittwoch, 1. April 2009 21:13:33 schrieb Ion Gaztañaga:
// Check alignment assert((static_cast
(ret->buf) - static_cast (0)) % Alignment == 0); Obviously, offset_ptr is not a pointer so it can be static_cast'ed. offset_ptr is a smart pointer that emulates a pointer that can be placed in shared memory. See offset_ptr docs and implementation for more details. Try
// Check alignment assert((static_cast
(ret->buf.get()) - static_cast (0)) % Alignment == 0);
Indeed. That was what I tried first. But that doesn't work either:
The compiler says "invalid use of »void«"
However, this does:
assert((static_cast