diff --git a/stl/inc/__msvc_int128.hpp b/stl/inc/__msvc_int128.hpp index 56b0b4371e6..ae0e015baa2 100644 --- a/stl/inc/__msvc_int128.hpp +++ b/stl/inc/__msvc_int128.hpp @@ -139,7 +139,7 @@ struct static constexpr void _Knuth_4_3_1_M( const uint32_t (&__u)[__m], const uint32_t (&__v)[__n], uint32_t (&__w)[__n + __m]) noexcept { #ifdef _ENABLE_STL_INTERNAL_CHECK - constexpr auto _Int_max = size_t{(numeric_limits::max)()}; + constexpr auto _Int_max = static_cast((numeric_limits::max)()); _STL_INTERNAL_STATIC_ASSERT(__m <= _Int_max); _STL_INTERNAL_STATIC_ASSERT(__n <= _Int_max); #endif // _ENABLE_STL_INTERNAL_CHECK @@ -188,7 +188,7 @@ struct static constexpr void _Knuth_4_3_1_D(uint32_t* const __u, const size_t __u_size, const uint32_t* const __v, const size_t __v_size, uint32_t* const __q) noexcept { // Pre: __u + [0, __u_size), __v + [0, __v_size), and __q + [0, __u_size - __v_size) are all valid ranges - // constexpr auto _Int_max = size_t{(numeric_limits::max)()}; + // constexpr auto _Int_max = static_cast((numeric_limits::max)()); // _STL_INTERNAL_CHECK(__v_size <= _Int_max); const int __n = static_cast(__v_size); // _STL_INTERNAL_CHECK(__u_size > __v_size); diff --git a/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp b/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp index fabf6cde482..653a51d077d 100644 --- a/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp +++ b/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp @@ -999,7 +999,7 @@ void test_pointer_specs() { template void test_string_specs() { auto cstr = STR("scully"); - auto view = basic_string_view{cstr}; + basic_string_view view{cstr}; assert(format(STR("{:}"), cstr) == cstr); assert(format(STR("{:}"), view) == cstr); diff --git a/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp b/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp index 4335bf5cc40..a748b441269 100644 --- a/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp +++ b/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp @@ -3208,7 +3208,7 @@ namespace reverse_iterator_test { constexpr bool test() { // Validate iter_move int count = 0; - auto i = reverse_iterator{proxy_iterator<0>{&count}}; + reverse_iterator i{proxy_iterator<0>{&count}}; assert(ranges::iter_move(i) == 42); assert(count == 1); @@ -3456,7 +3456,7 @@ namespace move_iterator_test { constexpr bool test() { // Validate iter_move int count = 0; - auto i = move_iterator{proxy_iterator<0>{&count}}; + move_iterator i{proxy_iterator<0>{&count}}; assert(ranges::iter_move(i) == 42); assert(count == 1); diff --git a/tests/std/tests/P0896R4_views_transform/test.cpp b/tests/std/tests/P0896R4_views_transform/test.cpp index e314e7e6a33..19511406f66 100644 --- a/tests/std/tests/P0896R4_views_transform/test.cpp +++ b/tests/std/tests/P0896R4_views_transform/test.cpp @@ -619,7 +619,7 @@ struct iterator_instantiator { assert((0 + I{}).base().peek() == nullptr); STATIC_ASSERT(NOEXCEPT_IDL0(2 + i)); - auto vi = I{}; + I vi{}; assert(&(i += 5) == &i); assert(i.base().peek() == mutable_ints + 5); assert(&(vi += 0) == &vi); diff --git a/tests/std/tests/P1522R1_difference_type/test.cpp b/tests/std/tests/P1522R1_difference_type/test.cpp index f727e51165f..fa26a332c6a 100644 --- a/tests/std/tests/P1522R1_difference_type/test.cpp +++ b/tests/std/tests/P1522R1_difference_type/test.cpp @@ -748,7 +748,7 @@ constexpr bool test_signed() { assert(product._Word[1] == 0x05050505'05050505); } { - auto product = _Signed128{0x01010101'01010101, 0x01010101'01010101}; + _Signed128 product{0x01010101'01010101, 0x01010101'01010101}; product *= product; assert(product == 0x100f0e0d'0c0b0a09'08070605'04030201_i128); assert(product._Word[0] == 0x08070605'04030201); diff --git a/tests/std/tests/P2321R2_views_zip/test.cpp b/tests/std/tests/P2321R2_views_zip/test.cpp index 3b7dda50219..e61ad978dd0 100644 --- a/tests/std/tests/P2321R2_views_zip/test.cpp +++ b/tests/std/tests/P2321R2_views_zip/test.cpp @@ -679,28 +679,25 @@ class instantiator_impl : private range_type_solver { (Diff == test::CanDifference::yes ? test::CanDifference::no : test::CanDifference::yes)>; template - static constexpr void test_single_range(ContainerType&& container) { + static constexpr void test_single_range(ContainerType&& single_element_container) { // Create a copy of the container. That way, we can always test iter_swap, // even if container has const elements. - auto writable_single_element_container = container; - auto single_range = - tuple_element_t<0, standard_range_tuple_type>{writable_single_element_container.get_element_span()}; + auto writable = single_element_container; + tuple_element_t<0, standard_range_tuple_type> single_range{writable.get_element_span()}; - test_one(writable_single_element_container, single_range); + test_one(writable, single_range); } template - static constexpr void test_three_ranges(ContainerType&& container) { + static constexpr void test_three_ranges(ContainerType&& three_element_container) { // Create a copy of the container. That way, we can always test iter_swap, // even if container has const elements. - auto writable_three_element_container = container; - auto first_range = DifferingRangeType{writable_three_element_container.template get_element_span<0>()}; - auto second_range = tuple_element_t<1, standard_range_tuple_type>{ - writable_three_element_container.template get_element_span<1>()}; - auto third_range = tuple_element_t<2, standard_range_tuple_type>{ - writable_three_element_container.template get_element_span<2>()}; - - test_one(writable_three_element_container, first_range, second_range, third_range); + auto writable = three_element_container; + DifferingRangeType first_range{writable.template get_element_span<0>()}; + tuple_element_t<1, standard_range_tuple_type> second_range{writable.template get_element_span<1>()}; + tuple_element_t<2, standard_range_tuple_type> third_range{writable.template get_element_span<2>()}; + + test_one(writable, first_range, second_range, third_range); } public: