Open scottmcnab opened 6 years ago
Note this error occurs when using the legacy1 branch that mirrors the documentation online.
OK I found the cause of the problem - the C++14 implementation of "Unpack tuple" (in Util.h) fails when built using the C++17 compiler. If this apply() method is removed and replaced with the std::apply() implementation in the C++17 standard, then the compile errors disappear.
In case anyone else encounters this compile error, I have attached a patch that replaces apply() with std::apply() (note: this patch will break compatibility with C++14 compilers):
cpp.react fails to compile on Visual Studio 2017 15.5.7 when attempting to use the C++17 compiler. Specifically, any code that attempts to call MakeSignal() gives build errors.
For example, building a single file BasicAlgorithms.cpp (using ctrl-F7) gives this error when compiler flag /std::c++17 is enabled in the project properties (under C/C++ --> Language --> C++ Language Standard):
Note: this exact same file compiles cleanly when the compiler flag /std:c++14 is used instead:
Do you know how to avoid this "ambiguous call to overloaded function" compiler error in C++17 mode? Any pointers would be greatly appreciated. Thanks!