mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 09:16:46 +08:00
Remove custom deduction guides for std::unique_ptr in C++17 mode. Issue: FreeBSD GCC 13.3 correctly rejects adding deduction guides to namespace std, which violates C++ standard [namespace.std]: "The behavior of a C++ program is undefined if it adds declarations or definitions to namespace std or to a namespace within namespace std." Root cause: The code attempted to add custom deduction guides for std::unique_ptr in namespace std when compiling in C++17 mode. This is not allowed by the C++ standard. Solution: Remove the custom deduction guides for C++17 and later, as the C++17 standard library already provides deduction guides for std::unique_ptr (added in C++17 via P0433R2). The custom deduction guide wrappers in the else branch (for C++14 and earlier) are kept as they provide helper functions, not actual deduction guides in namespace std. Tested-on: FreeBSD 15 with GCC 13.3 Fixes: Compilation error 'deduction guide must be declared in the same scope as template std::unique_ptr' |
||
|---|---|---|
| .. | ||
| libipc | ||
| CMakeLists.txt | ||