From f5912990ed55d91989769cab64f55eb91e33df7e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 15 Dec 2023 16:52:48 +0100 Subject: [PATCH] tst_qxp_function_ref: check that function_ref's are trivially copyable Mandated by P0792R9 already, but we never checked and P0792R14 has user-defaulted assignment operators showing up in the synopsis now, so make sure we don't accidentally break this going forward. Amends 29b65c98e720056e87334ce88a683969e57efd3d. Pick-to: 6.5 Change-Id: Ief9c5ff30895f8bfccec1c24d1777d3dab76c95a Reviewed-by: Thiago Macieira Reviewed-by: Fabian Kosmale (cherry picked from commit 4271114dc6b6c699efe11dc1a2b8946d2bbbb241) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 61566fa52d260e9246a2c487ba9048222ceed24f) --- .../corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp b/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp index 6264e6a5ae9..702e8ebcd17 100644 --- a/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp +++ b/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp @@ -249,6 +249,8 @@ void tst_qxp_function_ref::ctad() qxp::function_ref f2 = &fun; \ static_assert(std::is_same_v>); \ + static_assert(std::is_trivially_copyable_v); \ + static_assert(std::is_trivially_copyable_v); \ } while (false) CHECK(i_f_i_nx, int (int) noexcept);