Skip to content

Commit e88474f

Browse files
Code review feedback.
1 parent f847e92 commit e88474f

4 files changed

Lines changed: 18 additions & 16 deletions

File tree

tests/std/tests/P0896R4_ranges_alg_find_end/test.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ constexpr void smoke_test() {
7272
}
7373
}
7474

75-
constexpr void test_1559808() {
75+
constexpr void test_devcom_1559808() {
7676
// Regression test for DevCom-1559808, an interaction between vector and the
7777
// use of structured bindings in the constexpr evaluator.
7878

79-
std::vector<int> haystack(33, 42), needle(8, 42); // No particular significance to any numbers in this function
79+
std::vector<int> haystack(33, 42); // No particular significance to any numbers in this function
80+
std::vector<int> needle(8, 42);
8081
using size_type = std::vector<int>::size_type;
8182

8283
auto result = ranges::find_end(haystack, needle);
@@ -93,8 +94,8 @@ int main() {
9394
STATIC_ASSERT((smoke_test(), true));
9495
smoke_test();
9596

96-
STATIC_ASSERT((test_1559808(), true));
97-
test_1559808();
97+
STATIC_ASSERT((test_devcom_1559808(), true));
98+
test_devcom_1559808();
9899
}
99100

100101
#ifndef _PREFAST_ // TRANSITION, GH-1030

tests/std/tests/P0896R4_ranges_alg_search/test.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,12 @@ constexpr bool run_tests() {
169169
return true;
170170
}
171171

172-
constexpr void test_1559808() {
172+
constexpr void test_devcom_1559808() {
173173
// Regression test for DevCom-1559808, an interaction between vector and the
174174
// use of structured bindings in the constexpr evaluator.
175175

176-
std::vector<int> haystack(33, 42), needle(8, 42); // No particular significance to any numbers in this function
176+
vector<int> haystack(33, 42); // No particular significance to any numbers in this function
177+
vector<int> needle(8, 42);
177178

178179
auto result = ranges::search(haystack, needle);
179180
assert(result.begin() == haystack.begin());
@@ -189,7 +190,7 @@ int main() {
189190
STATIC_ASSERT(run_tests());
190191
run_tests();
191192

192-
STATIC_ASSERT((test_1559808(), true));
193-
test_1559808();
193+
STATIC_ASSERT((test_devcom_1559808(), true));
194+
test_devcom_1559808();
194195
}
195196
#endif // TEST_EVERYTHING

tests/std/tests/P0896R4_ranges_alg_sort/test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct instantiator {
5252
}
5353
};
5454

55-
constexpr void test_1559808() {
55+
constexpr void test_devcom_1559808() {
5656
// Regression test for DevCom-1559808, a bad interaction between constexpr vector and the use of structured bindings
5757
// in the implementation of ranges::sort.
5858

@@ -65,6 +65,6 @@ int main() {
6565
STATIC_ASSERT((test_random<instantiator, P>(), true));
6666
test_random<instantiator, P>();
6767

68-
STATIC_ASSERT((test_1559808(), true));
69-
test_1559808();
68+
STATIC_ASSERT((test_devcom_1559808(), true));
69+
test_devcom_1559808();
7070
}

tests/std/tests/P0896R4_views_split/test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ constexpr bool instantiation_test() {
321321
return true;
322322
}
323323

324-
constexpr bool test_1559808() {
324+
constexpr bool test_devcom_1559808() {
325325
// Regression test for DevCom-1559808, an interaction between vector and the
326326
// use of structured bindings in the constexpr evaluator.
327327

@@ -345,8 +345,8 @@ int main() {
345345
STATIC_ASSERT(instantiation_test());
346346
instantiation_test();
347347

348-
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevDiv-1516290
349-
STATIC_ASSERT(test_1559808());
350-
#endif // TRANSITION, DevDiv-1516290
351-
test_1559808();
348+
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-1516290
349+
STATIC_ASSERT(test_devcom_1559808());
350+
#endif // TRANSITION, DevCom-1516290
351+
test_devcom_1559808();
352352
}

0 commit comments

Comments
 (0)