Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

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

(1/1)

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

--- Code: ---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; }

--- End code ---

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

Navigation

[0] Message Index

Go to full version