Commit ab8e6c7
committed
fix(log): move sa_initiator struct outside get_sa() function
- src/libipc/platform/win/get_sa.h:
* Move 'struct initiator' definition outside get_sa() function
* Rename to 'sa_initiator' to avoid naming conflicts
* Define at namespace ipc::detail scope (above get_sa function)
* Keep template constructor: template <typename Logger> sa_initiator(Logger const &log)
* get_sa() now simply uses: static sa_initiator handle(log);
This fixes the C++ standard violation:
- C++03/11/14/17/20 all prohibit local classes from having member templates
- Error C2892: 'local class shall not have member templates'
- Moving the struct to namespace scope resolves this issue
The struct is now a proper namespace-level definition with a template
constructor, which is fully compliant with C++ standards.1 parent 72eedeb commit ab8e6c7
1 file changed
+23
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
15 | 12 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
30 | 22 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
0 commit comments