yubox-node-org / ESPAsyncWebServer

Async Web Server for ESP8266 and ESP32
23 stars 16 forks source link

Unable to build fixes branch due to usage of incomplete type #1

Open selalipop opened 3 years ago

selalipop commented 3 years ago

In AsyncWebSocket.h there is a forward declaration of AsyncWebSocketControl. Later in the header this declaration is referenced in defining AsyncWebSocketClient:

    class AsyncWebSocketControl; //Defined in AsyncWebSocket.cpp

    ...

    class AsyncWebSocketClient{
        std::deque<AsyncWebSocketControl> _controlQueue; 
        ...
    }

However, as far as I can tell std::deque requires a complete type definition, leading to this error:

error: invalid use of incomplete type 'std::deque<AsyncWebSocketControl>

I know C++17 allows certain containers to use incomplete types in declarations, but as far as I could find, std::deque is not one of them, I believe this branch is trying to limit itself to C++11 features

Has anyone else ran into this? A quick fix is to move the full declaration of AsyncWebSocketControl to the header file, but there are many commits after the commit that introduced the usage std::deque, some I'm wondering if it could be something with my environment or imports

Full logs, but it's mostly repeating the same error