
on Wed Dec 12 2012, Nevin Liber <nevin-AT-eviloverlord.com> wrote:
On 12 December 2012 10:49, Adam Wulkiewicz <adam.wulkiewicz@gmail.com>wrote:
I don't see a way to implement non-throwing swap since I don't want to use some external storage.
It should be non-throwing if the underlying T has a non-throwing move or copy constructor.
So swap probably won't be implemented - just copy.
If you can, make the interface as close as possible to C++11 std::vector (well, maybe not vector<bool>, but other than that...). I would do swap even if it can throw; only provide the basic guarantee if it does throw.
+1 Likewise move. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost