36 #ifndef LIB_TEST_TRANSIENTLY_H 37 #define LIB_TEST_TRANSIENTLY_H 53 template<
typename TAR>
62 : originalVal_{target}
63 , manipulated_{target}
68 manipulated_ = std::move (originalVal_);
75 manipulated_ = std::forward<X> (x);
85 using Manipulator = std::function<void(void)>;
92 : doIt_{std::move (manipulation)}
98 CHECK (undoIt_,
"REJECT Manipulation -- " 99 "Failed to provide a way " 100 "to undo the manipulation.");
105 cleanUp (Manipulator cleanUp)
107 undoIt_ = std::move (cleanUp);
116 template<
typename FUN,
typename=lib::meta::enable_if<lib::meta::has_Sig<FUN,
void(
void)>>>
130 #define TRANSIENTLY(_OO_) \ 131 lib::test::Transiently PPMPL_CAT(transientlyManipulated_,__LINE__)(_OO_); PPMPL_CAT(transientlyManipulated_,__LINE__)
Any copy and copy construction prohibited.
Implementation namespace for support and library code.
Variation where manipulation is done by λ
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Metaprogramming tools for transforming functor types.
Preprocessor metaprogramming library.
Token to capture a value and restore original when leaving scope.