c++14 provides variable templates Which work fine in visual-studio-2017, but within lambdas they seem to fall apart. For example:
template <typename T>
const auto PI = std::acos(static_cast<T>(-1));
int main() {
auto func = []() { cout << PI<float> << endl; };
func();
}
On gcc 6.3 this outputs:
3.14159
On Visual Studio 2017 this outputs:
0.0