Skip to content

Commit 3b9f9bb

Browse files
committed
UARTSerial: Avoid readable() ambiguity
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.
1 parent 22b183a commit 3b9f9bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/UARTSerial.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class UARTSerial : private SerialBase, public FileHandle, private NonCopyable<UA
5656
*/
5757
virtual short poll(short events) const;
5858

59+
/* Resolve ambiguities versus our private SerialBase
60+
* (for writable, spelling differs, but just in case)
61+
*/
62+
using FileHandle::readable;
63+
using FileHandle::writable;
64+
5965
/** Write the contents of a buffer to a file
6066
*
6167
* @param buffer The buffer to write from

0 commit comments

Comments
 (0)