Commit 82fb2ee
committed
fix(fault_manager): explicit ctor for LockedSubscriptionGuard (C++20 aggregate)
Rolling's gcc 14 / libstdc++ enforces the C++20 wording of [dcl.init.aggr]
that disqualifies a class as an aggregate when it has any user-declared
constructors - including ``= delete`` ones (rule tightened from C++17's
"user-provided" to C++20's "user-declared"). Even with
CMAKE_CXX_STANDARD=17 set, the libstdc++ headers/checks behave as C++20
on rolling, breaking ``LockedSubscriptionGuard{&mtx, sub, cg}`` because
the only candidates are the deleted copy/move constructors.
Add an explicit 3-arg constructor so brace-init resolves to direct-init
regardless of aggregate semantics across distros (Jazzy/Humble C++17 and
Rolling effective-C++20). Reproduces locally with ``g++ -std=c++20``.1 parent d675c07 commit 82fb2ee
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
0 commit comments