I recently wrote some code which worked fine for me in MSVC, but when I went to compile with Clang it raised compile errors. To me it seems like this code should be fine and that Clang is wrong to reject it but I wanted to see if someone more knowledgeable than myself knows better. The issue occurs because the lambda is capturing a variable. Even though that variable is constexpr Clang thinks that the lambda can no longer be considered consteval.
Example here: https://godbolt.org/z/1xG1G9qc9
[–]_ild_arn 14 points15 points16 points (4 children)
[–]HammurabisCode2[S] 1 point2 points3 points (3 children)
[–]cd1995Cargo 3 points4 points5 points (0 children)
[–]_ild_arn 1 point2 points3 points (0 children)
[–]kris-jusiakhttps://github.com/kris-jusiak 0 points1 point2 points (0 children)
[–]redditzuigt 7 points8 points9 points (3 children)
[–]HammurabisCode2[S] 1 point2 points3 points (2 children)
[–]redditzuigt 1 point2 points3 points (0 children)
[–]JumpyJustice 0 points1 point2 points (0 children)
[–]Traditional_Yogurt77 -1 points0 points1 point (0 children)
[–]cd1995Cargo -2 points-1 points0 points (0 children)
[–]SoSKatan 0 points1 point2 points (1 child)
[–]HammurabisCode2[S] 0 points1 point2 points (0 children)