Subject: Re: [boost] static_vector using aligned_storage
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-12-15 17:55:11
on Wed Dec 12 2012, Nevin Liber <nevin-AT-eviloverlord.com> wrote:
> On 12 December 2012 10:49, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]>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.
-- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost