In the code below, static_assert operates on the addresses of local variables, but however MS compiles it and the assertion does not fail:
#include <tuple>
#include <string>
struct A
{
int a;
double b;
std::string c;
};
void f()
{
A a{ 1, 3.0, "abc" };
constexpr auto t1 = std::tie(a.a, a.b, a.c);
static_assert(&std::get<0>(t1) == &a.a);
}
Use the following command to compile this example:
cl /std:c++17 /EHsc a.cpp