From 6ac74ad41e20a0ec31b372a039ff080338b475d4 Mon Sep 17 00:00:00 2001 From: Jeremy Ong Date: Wed, 4 Aug 2021 03:12:17 -0600 Subject: [PATCH] Resolve clang compiler error "If constexpr" branches are evaluated at template instantiation time, but static assertions receiving false are triggered even earlier. Signed-off-by: Jeremy Ong --- Code/Framework/AzCore/AzCore/Jobs/Internal/JobTypeEraser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobTypeEraser.h b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobTypeEraser.h index 11d7f955b4..e57ba85176 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobTypeEraser.h +++ b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobTypeEraser.h @@ -59,7 +59,7 @@ namespace AZ::Internal else { static_assert( - false, + AZStd::is_move_constructible_v || AZStd::is_copy_constructible_v, "Job lambdas must be either move or copy constructible. Please verify that all captured data is move or copy " "constructible."); } @@ -187,7 +187,7 @@ namespace AZ::Internal else { static_assert( - false, + AZStd::is_move_constructible_v || AZStd::is_copy_constructible_v, "Job lambdas must be either move or copy constructible. Please verify that all captured data is move or copy " "constructible."); }