title: Inline allocation of memory at compile time
body: <p><em>C/C++</em> have multiple ways to allocate memory at compile time. For example, I can add a global or static variable. The memory to store the value is allocated at compile time:</p>
  
  <pre><code>int x;
  // -- or --
  void f() {
      static int y;
  }
  // -- or --
  class C {
      static int z;
  };
  int C::z;
  </code></pre>
  
  <p>But this solutions can't be used to allocate memory "inline". Is there a possibility to do something like the following in one line?</p>
  
  <pre><code>static int value_behind_x; // does not need to be "named"
  int * const x = &amp;value_behind_x;
  </code></pre>
  
  <p>I mean something that looks like this:</p>
  
  <pre><code>int * const x = static_new int;
  // -- or --
  int * const x_array = static_new int[10];
  </code></pre>
  
  <p>I know about one thing in C/C++ that allows something like this: string literals. However, they must be constant and they don't allow specifying the size as number.</p>
  
  <p>If there is no such way, is there a reason for that or may it be implemented in the future? It would be nice because it would make it possible to implement a <code>constexpr</code> version of containers like <code>std::vector</code>.</p>