Skip to content

Commit 7402319

Browse files
committed
fix formatting issues
1 parent 032858a commit 7402319

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

libcxx/test/std/utilities/intseq/intseq.binding/integer_seq.pass.cpp

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,31 @@
1818

1919
#include "test_macros.h"
2020

21-
int main(int, char**)
22-
{
23-
using empty = std::integer_sequence<int>;
24-
using size4 = std::integer_sequence<int, 9, 8, 7, 2>;
25-
26-
static_assert ( std::tuple_size_v<empty> == 0, "empty size wrong" );
27-
static_assert ( std::tuple_size_v<const empty> == 0, "empty size wrong" );
28-
29-
static_assert ( std::tuple_size_v<size4> == 4, "size4 size wrong" );
30-
static_assert ( std::tuple_size_v<const size4> == 4, "size4 size wrong" );
31-
32-
static_assert ( std::is_same_v<std::tuple_element_t<0, size4>, int>, "size4 type wrong" );
33-
static_assert ( std::is_same_v<std::tuple_element_t<1, size4>, int>, "size4 type wrong" );
34-
static_assert ( std::is_same_v<std::tuple_element_t<2, size4>, int>, "size4 type wrong" );
35-
static_assert ( std::is_same_v<std::tuple_element_t<3, size4>, int>, "size4 type wrong" );
36-
37-
static_assert ( std::is_same_v<std::tuple_element_t<0, const size4>, int>, "const4 type wrong" );
38-
static_assert ( std::is_same_v<std::tuple_element_t<1, const size4>, int>, "const4 type wrong" );
39-
static_assert ( std::is_same_v<std::tuple_element_t<2, const size4>, int>, "const4 type wrong" );
40-
static_assert ( std::is_same_v<std::tuple_element_t<3, const size4>, int>, "const4 type wrong" );
41-
42-
constexpr static size4 seq4{};
43-
static_assert ( get<0> (seq4) == 9, "size4 element 0 wrong" );
44-
static_assert ( get<1> (seq4) == 8, "size4 element 1 wrong" );
45-
static_assert ( get<2> (seq4) == 7, "size4 element 2 wrong" );
46-
static_assert ( get<3> (seq4) == 2, "size4 element 3 wrong" );
21+
int main(int, char**) {
22+
using empty = std::integer_sequence<int>;
23+
using size4 = std::integer_sequence<int, 9, 8, 7, 2>;
24+
25+
static_assert(std::tuple_size_v<empty> == 0, "empty size wrong");
26+
static_assert(std::tuple_size_v<const empty> == 0, "empty size wrong");
27+
28+
static_assert(std::tuple_size_v<size4> == 4, "size4 size wrong");
29+
static_assert(std::tuple_size_v<const size4> == 4, "size4 size wrong");
30+
31+
static_assert(std::is_same_v<std::tuple_element_t<0, size4>, int>, "size4 type wrong");
32+
static_assert(std::is_same_v<std::tuple_element_t<1, size4>, int>, "size4 type wrong");
33+
static_assert(std::is_same_v<std::tuple_element_t<2, size4>, int>, "size4 type wrong");
34+
static_assert(std::is_same_v<std::tuple_element_t<3, size4>, int>, "size4 type wrong");
35+
36+
static_assert(std::is_same_v<std::tuple_element_t<0, const size4>, int>, "const4 type wrong");
37+
static_assert(std::is_same_v<std::tuple_element_t<1, const size4>, int>, "const4 type wrong");
38+
static_assert(std::is_same_v<std::tuple_element_t<2, const size4>, int>, "const4 type wrong");
39+
static_assert(std::is_same_v<std::tuple_element_t<3, const size4>, int>, "const4 type wrong");
40+
41+
constexpr static size4 seq4{};
42+
static_assert(get<0>(seq4) == 9, "size4 element 0 wrong");
43+
static_assert(get<1>(seq4) == 8, "size4 element 1 wrong");
44+
static_assert(get<2>(seq4) == 7, "size4 element 2 wrong");
45+
static_assert(get<3>(seq4) == 2, "size4 element 3 wrong");
4746

4847
return 0;
4948
}

libcxx/test/std/utilities/intseq/intseq.binding/integer_seq.verify.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
#include <utility>
1515

1616
void f() {
17-
using test1 = typename std::tuple_element<0, std::integer_sequence<int>>::type; // expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::tuple_element<> (std::integer_sequence)}}
18-
using test2 = typename std::tuple_element<0, const std::integer_sequence<int>>::type; // expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::tuple_element<> (const std::integer_sequence)}}
17+
using test1 = typename std::tuple_element<0, std::integer_sequence<int>>::
18+
type; // expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::tuple_element<> (std::integer_sequence)}}
19+
using test2 = typename std::tuple_element<0, const std::integer_sequence<int>>::
20+
type; // expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::tuple_element<> (const std::integer_sequence)}}
1921

20-
auto empty = std::integer_sequence<int>();
21-
// expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::get<> (std::integer_sequence)}}
22-
// expected-error-re@*:* {{invalid index 0 for pack '{{.*}}' of size 0}}
23-
(void)std::get<0>(empty);
22+
auto empty = std::integer_sequence<int>();
23+
// expected-error-re@*:* {{static assertion failed{{.*}}Index out of bounds in std::get<> (std::integer_sequence)}}
24+
// expected-error-re@*:* {{invalid index 0 for pack '{{.*}}' of size 0}}
25+
(void)std::get<0>(empty);
2426
}

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def add_version_header(tc):
766766
"name": "__cpp_lib_integer_sequence",
767767
"values": {
768768
"c++14": 201304,
769-
"c++26": 202511, # P1789R3 Library Support for Expansion Statements
769+
"c++26": 202511, # P1789R3 Library Support for Expansion Statements
770770
},
771771
"headers": ["utility"],
772772
},

0 commit comments

Comments
 (0)