I believe the error is correct, because you can't insert using a const iterator as the insertion point.
Changing the offending line to mFunctionDecl.insert(mFunctionDecl.end(), check.mFunctionDecl.cbegin(), check.mFunctionDecl.cend());
allows a succesful build
Last edit: Steve Matty 2024-05-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(sorry, typo in topic should read
updateFunctionData()
)Compiling with GNU GCC 4.8.2 gives a (IMHO correct) error on the line
mFunctionDecl.insert(mFunctionDecl.cend(), check.mFunctionDecl.cbegin(), check.mFunctionDecl.cend());
Error:
I believe the error is correct, because you can't insert using a const iterator as the insertion point.
Changing the offending line to
mFunctionDecl.insert(mFunctionDecl.end(), check.mFunctionDecl.cbegin(), check.mFunctionDecl.cend());
allows a succesful build
Last edit: Steve Matty 2024-05-23
https://en.cppreference.com/w/cpp/container/list/insert begs to differ.
GCC 4.8.2 is from 2013, so I suspect there is some issue with its STL implementation.
I stand corrected - thanks for the super-quick response !