title: Static struct with static members
body: <p>Today I found myself creating a static array of 2 ints, and because its inline initalization is not allowed in C++ (not C++11), I reverted to using a static variable of type struct.</p>
  
  <pre><code>class MyWidget {
    ...
    static const struct Margin {
      const int horizontal = 1;
      const int vertical = 1;
    } margin;
  
  };
  </code></pre>
  
  <p>I noticed that internal variables are used only once for all instances of struct Margin, so I decided to make them static too.</p>
  
  <pre><code>class MyWidget {
    ...
    static const struct Margin {
      static const int horizontal = 1;
      static const int vertical = 1;
    } margin;
  
  };
  </code></pre>
  
  <p>What wonders me is the difference between declaring a static struct variable vs. a static struct variable with static members. AFAC static objects are allocated only once in memory, therefore Margin struct wil be allocated only once no matter if my members are static or not.</p>
  
  <p>Do I miss something? Does there exist a difference or is it a mere syntactic sugar?</p>