@@ -6,9 +6,11 @@ modernize-use-structured-binding
66Finds places where structured bindings could be used to decompose pairs and
77suggests replacing them.
88
9- This check finds three code patterns and recommends using structured bindings for clearer, more idiomatic C++17 code.
9+ This check finds three code patterns and recommends using structured bindings
10+ for clearer, more idiomatic C++17 code.
1011
11- 1. Decompose a pair variable by assigning its members to separate variables right after its definition:
12+ 1. Decompose a pair variable by assigning its members to separate variables
13+ right after its definition:
1214
1315.. code-block :: c++
1416
@@ -32,7 +34,8 @@ This check finds three code patterns and recommends using structured bindings fo
3234
3335 auto [a, b] = getPair<int, int>();
3436
35- 3. Manually decompose a pair by assigning to its members to local variables in a range-based for loop:
37+ 3. Manually decompose a pair by assigning to its members to local variables
38+ in a range-based for loop:
3639
3740.. code-block :: c++
3841
@@ -48,12 +51,14 @@ This check finds three code patterns and recommends using structured bindings fo
4851 // use x and y
4952 }
5053
51- The check also supports custom pair-like types via the :option: `PairTypes ` option.
54+ The check also supports custom pair-like types via the :option: `PairTypes `
55+ option.
5256
5357Options
5458-------
5559
5660.. option :: PairTypes
5761
58- A Semicolon-separated list of type names to be treated as pair-like for structured binding suggestions.
59- Example: `MyPairType;OtherPairType `. Default is `std::pair `.
62+ A Semicolon-separated list of type names to be treated as pair-like for
63+ structured binding suggestions. Example: `MyPairType;OtherPairType `.
64+ Default is `std::pair `.
0 commit comments