Update 2:

This is fixed now in VS 2019 Preview 16.1 Preview 1.

Update:

I have filed a bug report at visualstudio.com.

So I'm starting to get into C++'s templates and I ran into this issue when trying to prevent a template class from being compiled using static_assert .

Basically, the static_assert error is not triggered when it is inside a lambda on VS2017 using C++ Language Standard: ISO C++17 Standard (/std:c++17).

I also tried this on gcc-7 using -std=c++17 and the error is triggered. Is this a bug on VS2017 or is there something I'm missing?

Code sample: