title: Getting the right value_type
body: <p>In my class I have a member:</p>
  
  <pre><code>std::vector&lt;std::string&gt; memory_;
  </code></pre>
  
  <p>Now I'd like to have a fnc returning what's in the memory's first element but I do not want to specify <code>std::string</code> as a return type in case later I decide to use different type for this purpose so I've tried this but it doesn't work:</p>
  
  <pre><code>typename decltype(memory_)::value_type call_mem()
  {
      return memory_[0];
  }
  </code></pre>
  
  <p>Any ideas how to specify return type in the most generic way?</p>