-
Notifications
You must be signed in to change notification settings - Fork 3k
UARTSerial: Avoid readable() ambiguity #5066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
09601ba
to
d37bc46
Compare
😆 |
drivers/UARTSerial.h
Outdated
@@ -56,6 +56,15 @@ class UARTSerial : private SerialBase, public FileHandle, private NonCopyable<UA | |||
*/ | |||
virtual short poll(short events) const; | |||
|
|||
/** Resolve ambiguity versus our private SerialBase */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think these shouldn't be doxygen comments (no double asteriks). The inherited function should pop up in the generated doxygen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. A bit of Google suggests doxygen fails to understand using
declarations, such that this comment doesn't achieve anything, and if we were using
a private function, it wouldn't show up. But in this case it's a public function that was visible anyway.
UARTSerial inherits both FileHandle::readable() [public] and SerialBase::readable() [private], so calling readable() on a UARTSerial object produces an ambiguous member error. Add using declarations to direct towards the FileHandle versions of readable and writable. There's currently no ambiguity for writable, as SerialBase uses the spelling 'writeable', but add a using directive for that anyway, in case SerialBase gains 'writable' later.
d37bc46
to
3b9f9bb
Compare
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
UARTSerial
inherits bothFileHandle::readable()
[public] andSerialBase::readable()
[private], so callingreadable()
on a UARTSerialobject produces an ambiguous member error.
Add
using
declarations to direct towards theFileHandle
versions ofreadable
andwritable
.There's currently no ambiguity for
writable
, asSerialBase
uses thespelling
writeable
, but add ausing
directive for that anyway, in caseSerialBase
gainswritable
later.Resolves issue #5035