Menu

Parameter x can be declared const

Fraser
2020-01-09
2020-01-14
  • Fraser

    Fraser - 2020-01-09

    I have a lot of false positives with CPPCheck 1.90 but not previously for reference parameters saying 'Parameter x can be declared with const' when they can't be. Firstly x is an argument not a parameter so there is an issue with the writing. It should be saying "The parameter of argument x can be declared with const." I use the argument in the initialiser list to initialise a non-const reference member. To initialise one requires another non-const reference.

     
  • Fraser

    Fraser - 2020-01-13

    Do you mean 1.90 or a later beta? 9372 and 9356 do look like the issue I have.

     
  • Paul Fultz

    Paul Fultz - 2020-01-14

    I mean the version off of the latest master branch on github.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.