Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.54.0 Header Warnings: Shadowed Variables
From: Tom Browder (tom.browder_at_[hidden])
Date: 2013-11-13 14:00:10


On Wed, Nov 13, 2013 at 8:06 AM, Jeff Flinn <Jeffrey.Flinn_at_[hidden]> wrote:
> Maybe I don't see all of the context but how does icase shadow icase_ in the
> code above? Also std::size_t count = this->bset_.count(); seems perfectly
> fine to me - less of an issue than picking a less suitable variable name.

Note that the class has both an icase() and count() member so g++ is
warning about the possible confusion of identical class member names.

Remember, the intent of the warning is to warn the programmer about
possible misuse of one versus the other, so clearly renaming one is a
good practice for code for public use.

Best regards,

-Tom


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net