fix Issue 11497 - lambda in "static if"/"assert" prevent inlining of function
Merge pull request #2845 from 9rnsr/fix11497

Issue 11497 - lambda in "static if"/"assert" prevent inlining of function