after update VS2015.1 next code no longer compiles:
class testClass
{
static const std::vector test;
};
initialization
Unfortunately, I don't have enough "reputation" to comment, so I'll add my comments here.
@Peter Ruderman: complete support for constant initialization is on the list. I can't say yet whether it'll make it into Update 2 but we'll do our best. You're getting a warning for a type without constexpr constructors because of the bug which detected a different constexpr constructor in the call-tree. This usually comes from std::initializer_list<>.
@Peter Ruderman: Also, a slight correction: for static lifetime objects initialized with a constexpr constructor call, static initialization is required only if the initializer is a constant-initializer, i.e., consists only of constant expressions. Update1 does this for but not for types containing virtual functions.
Also: in the OP's code, no static initialization is required, though I suppose a compiler can do it for quality-of-implementation reasons. This is because 'const' was used rather than 'constexpr', the latter requiring static initialization.
To reiterate: disabling this warning is perfectly reasonable (and safe).