Skip to content

Official EthernetClient Sample Not Compiling - Ambiguous overload error with latest Arduino 1.0.6 #2611

Closed
@OzmoOzmo

Description

@OzmoOzmo

The code sample below - the official Arduino sample code.
will not compile:

    http://arduino.cc/en/Reference/ServerAvailable

My public code libraries use the EthernetClient library like this - and same method I used is mentioned in several books and several ethernet sources - but it will not compile anymore on 1.0.6

(I have tried official 1.0.6 and the nightly build ARDUINO 1.6.0rc3 - 2015.02.03)

The problem is EthernetClient cannot be tested for true/false anymore (it used to have a overloading that allowed you to query it being ready by using boolean comparitor).

The sample code has not worked since 1.0.5

Official Sample Code:

EthernetClient client = server.available();
if (client == true) { //compiler error here
}

What is the correct new way to do this test now - and will the documentation be changed or the IDE/Compiler be changed back (best option)?

Thanks very much.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions