I had a c++11 project on linux where i used the following signature which fails to compile on linux but compiles on windows
Error:
error: 'const' qualifiers cannot be applied to 'std::vector<long unsigned int>&'
error: 'const' qualifiers cannot be applied to 'std::map<long unsigned int, long unsigned int>&'
Function was
bool debugGlobalDs(std::vector<size_t> & const elementIds ,
std::map<long unsigned int, long unsigned int>& const mapElementIdToGlobalIndex)
{
....
return true
}
Why cant I use const qualifier here? Once I remove it, it compiles fine on Linux too.
Aucun commentaire:
Enregistrer un commentaire