mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +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.8%
Python
35%
C
0.1%
