State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.0v1|BugID:336043|
Problem summary:
The FnAttribute::StringAttribute class is defined with equal-to and not-equal-to operators, but only the equal-to operators are marked as const.
Steps to reproduce:
void foo(const FnAttribute::StringAttribute& sa) { if (sa == "bar") { // compiles } if (sa != "baz") { // doesn't compile }} Expected behaviour:
Compilation succeeds. The code runs fine.
Actual behaviour:
Compilation fails with an error message similar to the following:
error: passing 'const Foundry::Katana::StringAttribute' as 'this' argument of 'bool Foundry::Katana::StringAttribute::operator!=(const char*)' discards qualifiers [-fpermissive] if (sa != "baz") { ^ Workaround:
No known workaround.
Reproduced versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why