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 29b65c98e7.
Pick-to: 6.7 6.6 6.5
Change-Id: Ief9c5ff30895f8bfccec1c24d1777d3dab76c95a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
bb10
parent
41c41b4ba5
commit
4271114dc6
|
|
@ -249,6 +249,8 @@ void tst_qxp_function_ref::ctad()
|
|||
qxp::function_ref f2 = &fun; \
|
||||
static_assert(std::is_same_v<decltype(f2), \
|
||||
qxp::function_ref<sig>>); \
|
||||
static_assert(std::is_trivially_copyable_v<decltype(f)>); \
|
||||
static_assert(std::is_trivially_copyable_v<decltype(f2)>); \
|
||||
} while (false)
|
||||
|
||||
CHECK(i_f_i_nx, int (int) noexcept);
|
||||
|
|
|
|||
Loading…
Reference in New Issue