Skip to content

Commit

Permalink
Merge pull request #5228 from correaa/correaa-patch-use-adl-get
Browse files Browse the repository at this point in the history
[Multi] make changes to rely on ADL get instead of std::get
  • Loading branch information
ye-luo authored Nov 19, 2024
2 parents 3bc3c85 + e78d678 commit 2f8ef74
Show file tree
Hide file tree
Showing 255 changed files with 25,309 additions and 18,613 deletions.
2 changes: 1 addition & 1 deletion external_codes/boost_multi/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
command to update subtree to v0.80.1 tag. Run from top level QMCPACK source directory

git subtree pull --squash -P external_codes/boost_multi/multi https://gitlab.com/correaa/boost-multi.git v0.80.1
git subtree pull --squash -P external_codes/boost_multi/multi https://gitlab.com/correaa/boost-multi.git v0.86.0
266 changes: 50 additions & 216 deletions external_codes/boost_multi/multi/.clang-format
Original file line number Diff line number Diff line change
@@ -1,230 +1,64 @@
# https://clang-format-configurator.site
# Copyright 2020-2024 Alfredo A. Correa
---
Language: Cpp
# BasedOnStyle: Google
#AccessModifierOffset: -1
AlignAfterOpenBracket: BlockIndent # Align
Language: Cpp
AccessModifierOffset: -3
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
#AlignConsecutiveMacros: None
AlignConsecutiveAssignments: Consecutive # None
#AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: Consecutive
#AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: false
#AllowAllArgumentsOnNextLine: true
#AllowAllParametersOfDeclarationOnNextLine: true
#AllowShortEnumsOnASingleLine: true
#AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true # false
#AllowShortFunctionsOnASingleLine: All
#AllowShortLambdasOnASingleLine: All
#AllowShortIfStatementsOnASingleLine: WithoutElse
#AllowShortLoopsOnASingleLine: true
#AlwaysBreakAfterDefinitionReturnType: None
#AlwaysBreakAfterReturnType: None
#AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: No # Yes
#AttributeMacros:
# - __capability
#BinPackArguments: true
#BinPackParameters: true
#BraceWrapping:
# AfterCaseLabel: false
# AfterClass: false
# AfterControlStatement: Never
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
# BeforeLambdaBody: false
# BeforeWhile: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
#BreakBeforeBinaryOperators: None
#BreakBeforeConceptDeclarations: true
#BreakBeforeBraces: Attach
#BreakBeforeInheritanceComma: false
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignOperands: AlignAfterOperator
AllowAllArgumentsOnNextLine: false
AllowShortLambdasOnASingleLine: Inline
AllowShortCaseLabelsOnASingleLine: true
AlwaysBreakTemplateDeclarations: No
BreakInheritanceList: BeforeComma
#BreakBeforeTernaryOperators: true
#BreakConstructorInitializersBeforeComma: false
#BreakConstructorInitializers: BeforeColon
#BreakAfterJavaFieldAnnotations: false
#BreakStringLiterals: true
ColumnLimit: 0
#CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Right # Leave
#CompactNamespaces: false
BraceWrapping:
BeforeLambdaBody: false
ColumnLimit: 0
QualifierAlignment: Right
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 99
#Cpp11BracedListStyle: true
#DeriveLineEnding: true
#DerivePointerAlignment: true
#DisableFormat: false
#EmptyLineAfterAccessModifier: Never
#EmptyLineBeforeAccessModifier: LogicalBlock
#ExperimentalAutoDetectBinPacking: false
#PackConstructorInitializers: NextLine
#BasedOnStyle: ''
#ConstructorInitializerAllOnOneLineOrOnePerLine: false
#AllowAllConstructorInitializersOnNextLine: true
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
FixNamespaceComments: true
#ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
#IfMacros:
# - KJ_IF_MAYBE
#IncludeBlocks: Regroup
#IncludeCategories:
# - Regex: '^<ext/.*\.h>'
# Priority: 2
# SortPriority: 0
# CaseSensitive: false
# - Regex: '^<.*\.h>'
# Priority: 1
# SortPriority: 0
# CaseSensitive: false
# - Regex: '^<.*'
# Priority: 2
# SortPriority: 0
# CaseSensitive: false
# - Regex: '.*'
# Priority: 3
# SortPriority: 0
# CaseSensitive: false
#IncludeIsMainRegex: '([-_](test|unittest))?$'
#IncludeIsMainSourceRegex: ''
#IndentAccessModifiers: true # false
AccessModifierOffset: -98 # 2
#IndentCaseLabels: true
#IndentCaseBlocks: false
#IndentGotoLabels: true
#IndentPPDirectives: None
#IndentExternBlock: AfterExternBlock
#IndentRequires: false
IndentWidth: 99
#IndentWrappedFunctionNames: false
#InsertTrailingCommas: None
#JavaScriptQuotes: Leave
#JavaScriptWrapImports: true
#KeepEmptyLinesAtTheStartOfBlocks: false
#LambdaBodyIndentation: Signature
#MacroBlockBegin: ''
#MacroBlockEnd: ''
#MaxEmptyLinesToKeep: 1
#NamespaceIndentation: None
#ObjCBinPackProtocolList: Never
#ObjCBlockIndentWidth: 2
#ObjCBreakBeforeNestedBlockParam: true
#ObjCSpaceAfterProperty: false
#ObjCSpaceBeforeProtocolList: true
#PenaltyBreakAssignment: 2
#PenaltyBreakBeforeFirstCallParameter: 1
#PenaltyBreakComment: 300
#PenaltyBreakFirstLessLess: 120
#PenaltyBreakOpenParenthesis: 0
#PenaltyBreakString: 1000
IncludeBlocks: Regroup
IncludeCategories:
- Regex: <boost/test/unit_test\.hpp>
Priority: 1
- Regex: <(boost\/multi)\/
Priority: 2
- Regex: <([A-Za-z0-9\Q/-_\E])+>
Priority: 6
- Regex: <(catch2|boost)\/
Priority: 5
- Regex: <([A-Za-z0-9.\Q/-_\E])+>
Priority: 4
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"'
Priority: 3
IndentPPDirectives: BeforeHash
IndentWidth: 4
# LambdaBodyIndentation: Signature
PenaltyBreakTemplateDeclaration: 10
#PenaltyExcessCharacter: 1000000
#PenaltyReturnTypeOnItsOwnLine: 200
#PenaltyIndentedWhitespace: 0
PointerAlignment: Left
#PPIndentWidth: -1
#RawStringFormats:
# - Language: Cpp
# Delimiters:
# - cc
# - CC
# - cpp
# - Cpp
# - CPP
# - 'c++'
# - 'C++'
# CanonicalDelimiter: ''
# BasedOnStyle: google
# - Language: TextProto
# Delimiters:
# - pb
# - PB
# - proto
# - PROTO
# EnclosingFunctions:
# - EqualsProto
# - EquivToProto
# - PARSE_PARTIAL_TEXT_PROTO
# - PARSE_TEST_PROTO
# - PARSE_TEXT_PROTO
# - ParseTextOrDie
# - ParseTextProtoOrDie
# - ParseTestProto
# - ParsePartialTestProto
# CanonicalDelimiter: pb
# BasedOnStyle: google
#ReferenceAlignment: Pointer
#ReflowComments: true
#RemoveBracesLLVM: false
#SeparateDefinitionBlocks: Leave
#ShortNamespaceLines: 1
#SortIncludes: CaseSensitive
#SortJavaStaticImport: Before
#SortUsingDeclarations: true
#SpaceAfterCStyleCast: false
#SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false # true
#SpaceBeforeAssignmentOperators: true
#SpaceBeforeCaseColon: false
#SpaceBeforeCpp11BracedList: false
#SpaceBeforeCtorInitializerColon: true
#SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Custom # ControlStatements
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: false # true
# AfterForeachMacros: true
# AfterFunctionDefinitionName: false
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# BeforeNonEmptyParentheses: false
#SpaceAroundPointerQualifiers: Default
#SpaceBeforeRangeBasedForLoopColon: true
#SpaceInEmptyBlock: false
#SpaceInEmptyParentheses: false
AfterControlStatements: false
SpacesBeforeTrailingComments: 2
#SpacesInAngles: Never
#SpacesInConditionalStatement: false
#SpacesInContainerLiterals: true
#SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
# Maximum: -1
#SpacesInParentheses: false
#SpacesInSquareBrackets: false
#SpaceBeforeSquareBrackets: false
#BitFieldColonSpacing: Both
Standard: c++17
#StatementAttributeLikeMacros:
# - Q_EMIT
#StatementMacros:
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 99
#UseCRLF: false
UseTab: ForContinuationAndIndentation # Never
Minimum: 1
Standard: c++17
TabWidth: 4
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
- BOOST_REQUIRE
- BOOST_TEST
- BOOST_TEST_REQUIRE
#WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE
# - NS_SWIFT_NAME
# - CF_SWIFT_NAME
...
- BOOST_AUTO_TEST_CASE
18 changes: 6 additions & 12 deletions external_codes/boost_multi/multi/.clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*-indent-tabs-mode:nil;c-basic-offset:2;tab-width:2;autowrap:nil;-*-
# Copyright 2020-2024 Alfredo A. Correa

WarningsAsErrors: '*'
HeaderFilterRegex: '.'
Expand All @@ -14,9 +14,6 @@ CheckOptions:
- { key: readability-identifier-length.MinimumLoopCounterNameLength , value: 2 }
- { key: readability-identifier-length.MinimumParameterNameLength , value: 2 }
- { key: readability-identifier-length.MinimumVariableNameLength , value: 2 }
- { key: readability-identifier-naming.MacroDefinitionCase , value: UPPER_CASE }
- { key: readability-identifier-naming.MacroDefinitionPrefix, , value: BOOST_MULTI_ }
- { key: readability-identifier-naming.MacroDefinitionSuffix, , value: * }
- { key: readability-identifier-naming.NamespaceCase , value: lower_case }
- { key: readability-identifier-naming.PrivateMemberPrefix , value: '' }
- { key: readability-identifier-naming.PrivateMemberSuffix , value: _ }
Expand All @@ -32,25 +29,22 @@ CheckOptions:

Checks: '*,
-altera-struct-pack-align,
-clang-diagnostic-deprecated-declarations,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-fuchsia-overloaded-operator,
-fuchsia-trailing-return,
-llvmlibc-*,
-misc-include-cleaner,
-modernize-use-nodiscard,
-readability-magic-numbers
'
-readability-magic-numbers'
## explanation of the suppressed rules above:
# -altera-struct-pack-align, // this asks to use non-standard pragmas such as __attribute__((aligned(0))) and _attribute__((packed)), may interfeere with gcc/nvcc compatibility?
# -clang-diagnostic-deprecated-declarations // some test run deprecated functions on purposes
# -clang-diagnostic-deprecated-declarations // some test run deprecated functions on purpose
# -cppcoreguidelines-avoid-magic-numbers, // all tests use magic numbers
# -cppcoreguidelines-macro-usage, // BLAS adaptors uses a lot of macros
# -fuchsia-overloaded-operator, // this library overloads operators (==, <, +, &)
# -fuchsia-trailing-return, // to allow any '-> decltype(auto)', contradicts modernize trailing
# -llvmlibc-*, // nonsense warnings, for llvm developers
# -misc-include-cleaner, // using Boost.Test
# -llvm-header-guard, // allow PCH
# -misc-include-cleaner // allow PCH
# -modernize-use-nodiscard, // this would add [[nodiscard]] to almost all functions, adding a lot of noise
# -readability-magic-numbers, // all tests use magic numbers
# -readability-magic-numbers, // many tests use magic numbers

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[gl pipelines](https://gitlab.com/correaa/boost-multi/-/pipelines?page=1&scope=all)
[gl merge request](https://gitlab.com/correaa/boost-multi/-/merge_requests/new)

[![gitlabci](https://gitlab.com/correaa/boost-multi/badges/master/pipeline.svg)](https://gitlab.com/correaa/boost-multi/-/pipelines?page=1&scope=all)
3 changes: 3 additions & 0 deletions external_codes/boost_multi/multi/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
GIT_FETCH_JOBS: 8
NET_RETRY_COUNT: 5
DEFAULT_BUILD_VARIANT: debug,release
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
posix:
Expand Down Expand Up @@ -470,6 +471,7 @@ jobs:
addrmd: "64"
os: windows-2019

timeout-minutes: 120
runs-on: ${{matrix.os}}

steps:
Expand Down Expand Up @@ -517,6 +519,7 @@ jobs:
addrmd: "64"
os: windows-2022

timeout-minutes: 120
runs-on: ${{matrix.os}}

steps:
Expand Down
Loading

0 comments on commit 2f8ef74

Please sign in to comment.