|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Copies, moves and constructions of the items of the user that throw, in the functions that were noexcept.
More...
#include <stdexcept>#include <string>#include <tuple>#include <type_traits>#include <utility>#include <gtest/gtest.h>#include <gtest/gtest-spi.h>#include <ah-zip.H>#include <htlist.H>#include <tpl_array.H>#include <tpl_dnode.H>#include <tpl_dynArray.H>#include <tpl_dynMapTree.H>#include <tpl_dynMapOhash.H>#include <tpl_dynSetHash.H>#include <tpl_odhash.H>#include <tpl_olhash.H>#include <tpl_binHeap.H>Go to the source code of this file.
Copies, moves and constructions of the items of the user that throw, in the functions that were noexcept.
A noexcept function that copies, moves or builds an item of the user ends the program (std::terminate()) when that operation throws. Each function tested here must do one of three things with such an item: not be noexcept, let the exception reach the caller and leave the structure valid; absorb the failure and leave the structure valid; or not copy the item at all.
The items fail when asked to: from the k-th operation on, every copy (or move, or default construction) of them throws. Each test tries every k, until the operation completes before the k-th one, and counts the items alive to catch those that a failure leaks or destroys twice. A new node class, zipped container or tree is one more line in the list of its typed test.
Definition in file throwing_copy_test.cc.