Open PerretB opened 2 months ago
I've been wondering how to fix this. The default lambda parser is definitely not compliant with constexpr captures. How did you know that adding <> would fix this?
I had a vague memory of having encountered a similar problem with the template keyword before, but I can't say I knew it would work :D
Thanks! This will help my code base.
@JohanMabille please review! 🙂
Hi,
Line 1177
has the same .template
usage. For my project this change solved the error.
MSCV currently emits a syntax error on line (TBB with SIMD branch) https://github.com/xtensor-stack/xtensor/blob/8c0a484f04eccd0dbc0e25eb58a97de000fb048b/include/xtensor/xassign.hpp#L1252
Adds a simple syntax helper for MSVC (not sure what the standard says here).
FIXES #2736 (note that compiling with /Zc:lambda on MSVC is currently required to avoid this compiler bug https://developercommunity.visualstudio.com/t/lambda-fails-to-implicitly-capture-constexpr-value/610504 )