[chbot] Stuck on a C++ problem

Robin Gilks robin at gilks.org
Thu Jan 17 22:56:22 GMT 2019


I've been trying to build the following Saleae logic analyser plugin for
quadSPI flash chip but I'm hitting a compiler error (which may be a
VisualC/gcc incompatibility bug)


https://github.com/dedicatedcomputing/saleae_qspi

the error is

--------------------------------------------------
g++ -I"./AnalyzerSDK/include" -O3 -w -c -fpic
-o"release/QSPIAnalyzerCommands.o" "source/QSPIAnalyzerCommands.cpp"
source/QSPIAnalyzerCommands.cpp: In function ‘void QSPIMakeCommandList()’:
source/QSPIAnalyzerCommands.cpp:9:71: error: no match for ‘operator=’
(operand types are ‘std::map<long long unsigned int,
CommandAttr>::mapped_type {aka CommandAttr}’ and ‘<brace-enclosed
initializer list>’)
  qspi_cmds[0x66] = { false,false,false,false,0x00,0x00,"Reset Enable" };
                                                                       ^
In file included from source/QSPIAnalyzerCommands.cpp:2:0:
source/QSPIAnalyzerCommands.h:3:8: note: candidate: constexpr CommandAttr&
CommandAttr::operator=(const CommandAttr&)
 struct CommandAttr {
        ^~~~~~~~~~~
source/QSPIAnalyzerCommands.h:3:8: note:   no known conversion for
argument 1 from ‘<brace-enclosed initializer list>’ to ‘const
CommandAttr&’
source/QSPIAnalyzerCommands.h:3:8: note: candidate: constexpr CommandAttr&
CommandAttr::operator=(CommandAttr&&)
source/QSPIAnalyzerCommands.h:3:8: note:   no known conversion for
argument 1 from ‘<brace-enclosed initializer list>’ to ‘CommandAttr&&’
--------------------------------------------------

Unfortunately I don't have 3 years to learn enough about C++ to work it
out for myself so I'm hoping its a simple fix!!


-- 
Robin Gilks





More information about the Chchrobotics mailing list