Reputation: 155
If the nested struct will contain only static constant members, will it affect performance anyhow? I want to use it to scope these constants.
class File {
public:
struct Mode {
static const int Read = 0x01, Write = 0x02, Append = 0x04;
};
};
Is this a good practice?
Upvotes: 0
Views: 553
Reputation: 258568
Not at all, the variables are resolved at compile-time, not run-time.
Upvotes: 3