Menu

reference to const suggestion is invalid

2023-07-06
2023-07-07
  • Gaetano Mendola

    Gaetano Mendola - 2023-07-06

    cppcheck 2.11 claims that in the following snippet:

    std::istream& operator>>(std::istream& aStream, TimeBase& aT) {
      return aStream >> aT.theTime;
    }
    

    aT can be declared as const, ofc this is not true.

     
  • CHR

    CHR - 2023-07-07

    Thanks for reporting, ticket is here; https://trac.cppcheck.net/ticket/11818

     

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.