Commit d65eafe
committed
fix(uninitialized): Fix MSVC compilation error with std::map node construction
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 initialization1 parent bb3c6eb commit d65eafe
1 file changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | | - | |
| 39 | + | |
29 | 40 | | |
30 | | - | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
| |||
0 commit comments