08-07-2016, 03:46 PM
Does 11.0.1 "Member data in non-POD class types shall be private." apply to all data members, or only non-static data members?
In particular, I'm interested whether the constant in this code violates 11.0.1:
In particular, I'm interested whether the constant in this code violates 11.0.1:
Code:
class MyClass {
std::string non_pod_class;
public:
static const int CONSTANT = 10;
};
const int MyClass::CONSTANT;
<t></t>