Cevelop / Issues

The official issue tracker for Cevelop.
9 stars 1 forks source link

Wrong const suggestion from constificator #79

Closed morgner closed 5 years ago

morgner commented 6 years ago

Expected Behavior

No hint to make function parameter TMapL2L & m const

Actual Behavior

Hint to make function parameter TMapL2L & m const

Cevelop Version, Operating System and Compiler

Cevelop C++ IDE Version: 1.9.1-201802220948

OS: Linux, v.4.16.5-300.fc28.x86_64, x86_64 / gtk 2.24.32

non-const-map.zip

The code

#include <map>

using TMapL2L = std::map<long, long>;

long doit(TMapL2L & m)
  {
  return m[3];
  }

int main()
  {
  TMapL2L lm{ {1, 2} };
  doit(lm);
  }
fmorgner commented 5 years ago

Thanks for reporting! The bug has been fixed on develop. The fix will be included in next release.