Merge pull request #2136 from aws-lumberyard-dev/hultonha_LY-69118_lambda_crash

Update MSVC to use new lambda processing
This commit is contained in:
hultonha
2021-07-16 12:55:29 +01:00
committed by GitHub
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ namespace AZ
#define AZ_TraceFmtCompileTimeCheck(expression, isVaArgs, baseMsg, msg, msgVargs) \
{ \
using namespace AZ::TraceInternal; \
const auto& rTraceFmtCompileTimeCheckExpressionHelper = (expression); /* This is needed for edge cases for expressions containing lambdas, that were unsupported before C++20 */ \
[[maybe_unused]] const auto& rTraceFmtCompileTimeCheckExpressionHelper = (expression); /* This is needed for edge cases for expressions containing lambdas, that were unsupported before C++20 */ \
constexpr ExpressionValidResult isValidTraceFmtResult = ExpressionIsValid<decltype(rTraceFmtCompileTimeCheckExpressionHelper)>::value; \
/* Assert different message depending whether it's const char array or if we have extra arguments */ \
static_assert(!(isVaArgs) ? isValidTraceFmtResult != ExpressionValidResult::Invalid_ConstCharArray : true, baseMsg " " msg); \