<div dir="ltr">AFAIK, flat_* containers are really a std::vector disguised (wrapped) as a std::map or std::set.<div>Basically I assume that you are correct.</div><div>You can even manipulate manually the vector content if you want, as long as you keep the invariants valid (for example, keep the elements in sorted order).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 13, 2014 at 11:00 AM, Aaron Levy <span dir="ltr">&lt;<a href="mailto:aaron.levy@yandex.com" target="_blank">aaron.levy@yandex.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the type of the underlying contiguous storage used by the flat_map / flat_set containers? Does the following code make sense:<br>
<br>
flat_map&lt;T&gt; container;<br>
...<br>
if (container.size() &gt; 0) {<br>
  const T&amp; elem = *(container.begin());<br>
  const T&amp; elem_1 = *(container.begin() + 1);<br>
  assert(&amp;elem_1 == &amp;elem + 1);<br>
}<br>
<br>
Aaron<br>
_______________________________________________<br>
Boost-users mailing list<br>
<a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a><br>
<a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br>
</blockquote></div><br></div>