使用boost pfr 遍历结构体

This commit is contained in:
2026-06-26 09:36:15 +08:00
parent f885e88273
commit 1ac4b7b340
2 changed files with 14 additions and 6 deletions
+4 -6
View File
@@ -1,3 +1,4 @@
# Generated from CLion C/C++ Code Style settings
---
Language: Cpp
BasedOnStyle: LLVM
@@ -6,11 +7,8 @@ AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: false
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: Yes
BraceWrapping:
AfterCaseLabel: false
@@ -34,6 +32,7 @@ BreakConstructorInitializers: AfterColon
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ContinuationIndentWidth: 0
EmptyLineBeforeAccessModifier: Never
IncludeCategories:
- Regex: '^<.*'
@@ -48,7 +47,6 @@ InsertNewlineAtEOF: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 0
NamespaceIndentation: All
PointerAlignment: Left
SpaceInEmptyParentheses: false
SpacesInAngles: false
+10
View File
@@ -173,4 +173,14 @@ _register_git_cmake_library(
)
rcl_cmake_library_set_cmake_options(spdlog ${spdlog_opts})
_register_git_cmake_library(
pfr
pfr
"https://github.com/boostorg/pfr.git"
"2.2.0"
)
message("base.cmake load complete!")