mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06: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
|
||
|---|---|---|
| .. | ||
| libipc | ||