1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 15:12:06 +00:00
J. Nick Koston a5fc52ccbb Add stateless lambda infrastructure to TemplatableValue, Action, and Condition
Add STATELESS_LAMBDA support to TemplatableValue class using C++20 concepts:
- Automatically detects stateless lambdas (convertible to function pointers)
- Uses 4-byte function pointer instead of 32-byte std::function
- Falls back to std::function for stateful lambdas

Add StatelessLambdaAction and StatelessLambdaCondition classes for automation:
- Memory: 4 bytes vs 32 bytes per lambda
- Direct function pointer calls (no std::function overhead)

This infrastructure enables template platforms to use function pointers for
stateless lambdas, saving ~28 bytes per lambda instance.
2025-10-26 15:35:28 -07:00
2023-06-12 17:00:34 +12:00
2025-10-26 15:26:55 -07:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-10-22 22:24:17 -04:00
2025-10-08 21:14:45 +13:00
2025-07-17 22:40:28 +12:00
Description
No description provided
Readme Multiple Licenses 471 MiB
Languages
C++ 64.8%
Python 35%
C 0.1%