static constexpr member in-class initialization

344 views Asked by At

Could anyone help me find out what is wrong with in-class initialization of static constexpr member varaible like in the code below ?

Using Visual Studio 2013

struct hg {
public:
    static constexpr float asd = 9.0f;
};

int main() {
    return 0;
}

The above code gives the following errors :

Error 1

error C2144: syntax error : 'float' should be preceded by ';'

Error 2

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
0

There are 0 answers