mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 08:41:59 +00:00
a5fc52ccbb69dc298ef9dc5195f56123bad93ebb
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.
Description
Languages
C++
64.3%
Python
35.4%
C
0.2%
