mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
acc15ff49578013e2f89b7a1979fd19151270fc5
libc++ eagerly instantiates the unique_ptr<APIConnection> destructor when std::array<std::unique_ptr<APIConnection>, N> is parsed, requiring sizeof(APIConnection). api_server.h only forward-declares APIConnection (via list_entities.h), so the destructor instantiation fails for any translation unit that includes api_server.h without also including api_connection.h first. Wrap the unique_ptr in a custom deleter (APIConnectionDeleter) whose operator() is defined out-of-line in api_server.cpp where APIConnection is complete. The default_delete<APIConnection> path is never instantiated, so libc++'s incomplete-type assertion is avoided. GCC/libstdc++ already deferred this instantiation, so this only affects macOS host-platform builds (used by integration tests).
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
