2

From the C++ Standard ISO/IEC 14882, in chapter

9.4.2 Static data members

We read

A local class shall not have static data members.

Why not ? Is this logically deducable from other rules in the language or a design choice ?

Nikos Athanasiou
  • 29,616
  • 15
  • 87
  • 153
  • Nice question but it looks like it is covered here: [Why aren't static members allowed in local classes?](http://stackoverflow.com/questions/8162994/why-arent-static-members-allowed-in-local-classes) – Shafik Yaghmour Apr 23 '14 at 20:20
  • FYI, probably undeleted and closed because of the my question on meta: [When to undelete a question that was deleted by the OP?](http://meta.stackoverflow.com/questions/252552/when-to-undelete-a-question-that-was-deleted-by-the-op) – Shafik Yaghmour Apr 28 '14 at 18:20
  • @ShafikYaghmour There was no intention to repeat an existing question, just an unlucky google search on the topic. Now that's closed I keep getting downvotes though, so what's the point to keep it undeleted if it's just a rep bleed and no additional answers can be posted ? – Nikos Athanasiou Apr 28 '14 at 18:49
  • I realize that I actually upvoted, I did not find the duplicate immediately either, I kept looking because I was surprised it was not asked before. I only asked the question due to the two undelete votes cast by other users. – Shafik Yaghmour Apr 28 '14 at 18:52

0 Answers0