From 103c234196d1d3fa60ab7c48ff4dbdc43704e8a3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 18 Feb 2026 12:31:31 -0600 Subject: [PATCH 1/2] Add static_assert for Application default-constructibility --- esphome/core/application.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index aad71ff4d0..f3d9fac0da 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -675,6 +675,7 @@ void Application::yield_with_select_(uint32_t delay_ms) { #ifndef __GXX_ABI_VERSION #error "Application placement new requires Itanium C++ ABI (GCC/Clang)" #endif +static_assert(std::is_default_constructible::value, "Application must be default-constructible"); // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) alignas(Application) char app_storage[sizeof(Application)] asm("_ZN7esphome3AppE"); From f7f48abdf027341e3a85b093368ca7d8788d4d07 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 18 Feb 2026 12:42:52 -0600 Subject: [PATCH 2/2] Fix #include generating trailing semicolon --- esphome/core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/config.py b/esphome/core/config.py index a2b8746a62..215432835a 100644 --- a/esphome/core/config.py +++ b/esphome/core/config.py @@ -513,7 +513,7 @@ async def to_code(config: ConfigType) -> None: cg.add_global(cg.RawExpression("using std::max")) # Construct App via placement new — see application.cpp for storage details - cg.add_global(cg.RawExpression("#include ")) + cg.add_global(cg.RawStatement("#include ")) cg.add(cg.RawExpression("new (&App) Application()")) cg.add( cg.App.pre_setup(