18 template<test_mode Mode,
class Actions, moveonly T,
class U,
class V, std::invocable<T&> Mutator,
class... Args>
19 requires checkable_against_for_semantics<Mode, T, U> && checkable_against_for_semantics<Mode, T, V>
20 bool check_semantics(test_logger<Mode>& logger,
21 const Actions& actions,
26 optional_ref<const V> movedFromPostConstruction,
27 optional_ref<const V> movedFromPostAssignment,
31 sentinel<Mode> sentry{logger,
""};
33 if(!check_prerequisites(logger, actions, x, y, xEquivalent, yEquivalent, args...))
36 auto opt{check_move_construction(logger, actions, std::move(x), xEquivalent, movedFromPostConstruction, args...)};
37 if(!opt)
return false;
39 if constexpr (do_swap<Args...>::value)
41 if(check_swap(logger, actions, std::move(*opt), std::move(y), xEquivalent, yEquivalent, args...))
43 check_move_assign(logger, actions, y, std::move(*opt), yEquivalent, movedFromPostAssignment, std::move(m), args...);
48 check_move_assign(logger, actions, *opt, std::move(y), yEquivalent, movedFromPostAssignment, std::move(m), args...);
51 if constexpr (serializable_to<T, std::stringstream> && deserializable_from<T, std::stringstream>)
53 check_serialization(logger, actions, std::move(x), yEquivalent, args...);
56 return !sentry.failure_detected();
Implementation details for semantics checks that cleanly supports types which do/do not have allocato...
Condition for applying a container check.
Definition: AllocationCheckersDetails.cpp:15