Container for a stack of unique elements
<p>What I'm trying to do is to construct a stack which contains unique elements.</p>

<p>And if an element is pushed to which is already in stack the element is not pushed but the existing elemetn should be moved to the top of the stack, i.e. 
ABCD + B > ACDB</p>

<p>I would like to here from you which container will be the best choice to have this functionality.</p>

<p>I decided to user stack adapter over list, because</p>

<ol>
<li>list does provide constant time for element move</li>
<li>list is one of the natively supported containers for the stack.</li>
</ol>

<p>The drawback of my choice is that I have to manually check for the duplicate elements.</p>

<p>P.S. My compiler is not so recent so please don't suggest unordered_set.</p>
