Re: Re: istringstream.rdbuf with custom streambuf does not compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> But, I am not quite confident about the above reasoning. Am I wrong or not?

ISO/IEC WG21 (Working Draft, Standard for Programming Language C++) N4582:
[quote]
10.2 Member name lookup [class.member.lookup]
4 If C contains a declaration of the name f, the declaration set contains every declaration of f declared in C
that satisfies the requirements of the language construct in which the lookup occurs. [ Note:  
(... omitted ...) —end note ] If the resulting declaration set is not empty, the subobject set contains C itself,
and calculation is complete.
[/quote]

The name lookup stops as soon as the compiler finds 'basic_stringbuf<charT,traits,Allocator>* rdbuf() const' of basic_istringstream.
This is commonly known as 'name hiding'. The name 'rdbuf' of ios_base is effectively hidden by that of basic_istringstream.

Your question is about C++ itself rather than GCC so I don't think they belong here. :>


------------------				 
Best regards,
lh_mouse
2016-05-06






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux