tap: prohibit copy operators and all assignment operators

This commit is contained in:
Danny Robson 2018-10-16 18:06:18 +11:00
parent 6cab42d171
commit 1b3147ded7

11
tap.hpp
View File

@ -31,9 +31,20 @@ namespace cruft::TAP {
//---------------------------------------------------------------------
logger ();
logger (std::ostream&);
~logger ();
// NOTE: explicitly disable copy constructors and all assignment
// operators so that we don't accidentally overwrite the contained
// status code in any instance. This value is required in all
// instances so that we can return the correct status code from a test
// binary.
logger (logger&&) = default;
logger (logger const &) = delete;
logger& operator= (logger const &) = delete;
logger& operator= (logger &&) = delete;
//---------------------------------------------------------------------
template <typename ...Args, size_t N>
bool