From 5da7a3deab00d81df9c5fa708520fc05d6a22ffa Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 9 Nov 2021 17:48:50 +0000 Subject: [PATCH] gdb::array_view slicing/container selftest - test std::array too Change-Id: I2141b0b8a09f6521a59908599eb5ba1a19b18dc6 --- gdb/unittests/array-view-selftests.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/array-view-selftests.c index 43b7434d10f..fe211a647b5 100644 --- a/gdb/unittests/array-view-selftests.c +++ b/gdb/unittests/array-view-selftests.c @@ -137,8 +137,13 @@ check_ctor_from_container () } /* namespace no_slicing */ +/* std::array with only one template argument, so we can pass it to + check_ctor_from_container. */ +template using StdArray1 = std::array; + static_assert (no_slicing::check (), ""); static_assert (no_slicing::check_ctor_from_container (), ""); +static_assert (no_slicing::check_ctor_from_container (), ""); static_assert (no_slicing::check_ctor_from_container (), ""); /* Check that array_view implicitly converts from std::vector. */ -- 2.30.2