Le 06/11/2020 à 23:53, Yuriy Skalko a écrit :
Yes, RefChanger is an interesting approach, it will be better than stack.
This NewOutputParams class looks like variation of the RefChanger. Right?
I understand how RefChanger works, but Changer is a strange thing. How
can it work with empty functions? And why Revertible definition is
called forward declaration? Am I miss something?
// Forward declaration for support/RefChanger.h
struct Revertible {
virtual ~Revertible() {}
virtual void revert() {}
virtual void keep() {}
};
using Changer = unique_ptr<Revertible>;
I never understood how it works, but I always assumed it was C++ for
grown ups, jut without the lambda function mess. All I can say is that
it works :)
JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel