Changers

Yuriy Skalko yuriy.skalko at gmail.com
Sun Nov 15 16:00:14 UTC 2020


> Yuriy,
> this fails on older gccs, could you have a look?

I cannot reproduce this in my GCC 7.3 even in C++11 mode (by default it 
compiles in C++17 with CMake build). Please check if this helps:


diff --git a/src/support/Changer.h b/src/support/Changer.h
index 19a6b9a0cb..4c79052665 100644
--- a/src/support/Changer.h
+++ b/src/support/Changer.h
@@ -73,7 +73,7 @@ inline Changer noChange()
  /// To apply the change conditionally, one can write:
  ///     Changer dummy = (cond) ? changeVar(ref, val) : noChange();
  template <typename X>
-inline Changer changeVar(X & ref, X const val)
+inline RefChanger<X> changeVar(X & ref, X const val)
  {
  	auto rc = make_save(ref);
  	ref = val;


By the way, what is the oldest supported GCC? README says it is GCC 4.7. 
Is it right?


Yuriy


More information about the lyx-devel mailing list