title: How do I allocate a std::string on the stack using glibc's string implementation?
body: <pre><code>int main(void)
  {
     std::string foo("foo");
  }
  </code></pre>
  
  <p>My understanding is that the above code uses the default allocator to call new. So even though the std::string foo is allocated on the stack the internal buffer inside of foo is allocated on the heap.</p>
  
  <p>How can I create a string that is allocated entirely on the stack?</p>