
12 Dec
2012
12 Dec
'12
5:06 p.m.
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. -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404