mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
The issue occurs when container_allocator calls ipc::construct<T>() with no arguments.
MSVC and GCC have different behaviors regarding std::is_constructible for std::map's
internal node type.
Solution:
- Add explicit overload for zero-argument construct() using value initialization T()
- Separate overloads for one or more arguments to avoid SFINAE ambiguity
- This ensures MSVC uses direct initialization T() instead of aggregate initialization T{}
Fixes compilation error on Visual Studio 2017:
error C2512: no appropriate default constructor available
note: Invalid aggregate initialization
|
||
|---|---|---|
| .. | ||
| concur | ||
| imp | ||
| mem | ||
| buffer.h | ||
| condition.h | ||
| def.h | ||
| ipc.h | ||
| mutex.h | ||
| rw_lock.h | ||
| semaphore.h | ||
| shm.h | ||