On Feb 25, 2016, at 3:14 PM, Dave Goodell (dgoodell) <dgood...@cisco.com> wrote:
> 
>> So you can't have a local variable named "rank" any more?  That's... 
>> terrible!
> 
> Or you could avoid "using namespace std".  Or qualify it using "::rank" (I 
> think, my C++ is rusty).

Yeah, fair enough.  But I don't think we can guarantee that the user won't 
"using namespace std", so prefixing with :: is probably the right thing to do.

I still find it fairly astounding that the naked word "rank" (vs "rank()") is 
ambiguous with a variable and a function call.  I wouldn't be surprised by this 
in a scripting language; if this really is true in C++, that's quite surprising 
to me.

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

Reply via email to