Your code is not standard, there is no such thing. However, starting with C ++ 11, you can have constexpr constructors, so your object is created at compile time and can also be used in constexpr expressions.
Although I do not use it, MSVS is not the best compiler in terms of standard compliance, at least for what I understood from various questions on this site.
source share