mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
IMPROVEMENTS:
1. Add explicit zero-argument overload to avoid SFINAE ambiguity
2. Require at least one argument (A1) for parameterized overloads
3. Better separation between direct initialization and aggregate initialization
BENEFITS:
- Clearer intent: zero-argument construction is explicitly handled
- Avoids potential SFINAE ambiguity when empty parameter pack is used
- More maintainable: easier to understand which overload is selected
- Consistent with modern C++ best practices for variadic templates
TECHNICAL DETAILS:
- Zero-arg overload: Always uses T() for value initialization
- One-or-more-arg overload: Uses SFINAE to choose between:
* T(args...) for types with matching constructor
* T{args...} for aggregate types or types with initializer_list ctor
This is a code quality improvement and does not fix any compilation issues,
but provides better template overload resolution.
|
||
|---|---|---|
| .. | ||
| aligned.h | ||
| byte.h | ||
| codecvt.h | ||
| detect_plat.h | ||
| error.h | ||
| expected.h | ||
| export.h | ||
| fmt_cpo.h | ||
| fmt.h | ||
| generic.h | ||
| log.h | ||
| nameof.h | ||
| result.h | ||
| scope_exit.h | ||
| span.h | ||
| system.h | ||
| uninitialized.h | ||