News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

If your building with -std=c++17 a line change is needed

Started by Robert Eastwood, June 28, 2019, 04:47:45 AM

Previous topic - Next topic

Robert Eastwood

-std=c++1z has strict enforcement of const in comparison, as explained here
(it wont build without fixing this using -std=c++1z mingw64 8.1, codeblocks 17.12 recent trunk)

https://stackoverflow.com/questions/51235355/comparison-object-being-invocable-as-const

so you don't have to find how to correct the problem if your building with -std=c++1z, presuming your mingw64 has the same compile time assert

openfileslistplugin.h
line 26
bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) { return lhs->editorTabPos < rhs->editorTabPos; }
should be
bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) const { return lhs->editorTabPos < rhs->editorTabPos; }


basically all compare functions used by containers now need proper const syntax.  while using mingw64 8.1

and an interesting answer, or I found it interesting, on the -std=c++17 and -std=c++1z naming(I thought it was always being stylish).
https://meta.stackoverflow.com/questions/352031/why-is-the-c17-tag-replaced-by-the-c1z-tag