
Fred Bertsch wrote:
Second, there isn't as much type safety as there could be in a lot of these classes. For example, shared_message_queue does not have a template parameter to determine what is stored in the queue. Instead, its send and receive member functions take void*'s. Is there a good reason for this? I suppose another process could use the same shared_message_queue with another type, but I'd really like to see some type safety within the same process.
Moving a reinterpret_cast from user code, where it's visible, to the queue implementation, where it's hidden, decreases type safety instead of increasing it. A typed interface is only meaningful if the queue enforces type safety, perhaps by encoding the type (and ideally the compiler version) somehow.