#include <iostream>
#include <string>
using namespace std;
class A {
public:
constexpr A() {}
constexpr int area() {
return 12;
}
private:
// constexpr int h = 3;
// constexpr int w = 4;
};
int main()
{
constexpr A a;
constexpr int j = a.area();
cout << j << endl;
}
Why the code above can't compile with MSVC compiler while works with g++? Isn't MSVC not as strict as other compilers? The difference results between MSVC and g++ is sometimes confusing. Which compiler should I rely on, any tips btw?

