Summary In this post, I will introduce some common compiling errors I used to see related to in-class initialization: Error: in-class initialization of static data member xxx of non-literal type; Error: ISO C++ forbids in-class initialization of non-const static member xxx; Conclusion As usual, I present the correct ways to do in-class initialization at the…
In-Class Initialization Errors
Posted on