Skip to content

Use of Uri in webserver breaks current implementations #7102

Closed
@TD-er

Description

@TD-er

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

Problem Description

When calling the WebServer.on(...) function with a flash string, the compiler refuses to build.

Example error:

C:/GitHub/TD-er/ESPEasy/src/WebServer.ino:603:6: error: no matching function for call to 'esp8266webserver::ESP8266WebServerTemplate<WiFiServer>::on(const __FlashStringHelper*, HTTPMethod, WebServerInit()::__lambda4)'

Simple work-around is to replace all calls like this with a String() wrapper around the flash string.

I guess the best fix would be to add a constructor for Uri with const __FlashStringHelper* as parameter.

N.B. some of the derived classes use explicit in the constructor definition, but Uri not. Is this intentional?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions