1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 07:03:55 +00:00
This commit is contained in:
J. Nick Koston
2025-10-26 12:28:09 -07:00
parent 561c891432
commit 4967f40551

View File

@@ -40,7 +40,7 @@ template<typename T, typename... X> class TemplatableValue {
// For stateful lambdas (not convertible to function pointer): use std::function
template<typename F>
TemplatableValue(F f) requires std::invocable<F, X...> && !std::convertible_to<F, T (*)(X...)> : type_(LAMBDA) {
TemplatableValue(F f) requires std::invocable<F, X...> &&(!std::convertible_to<F, T (*)(X...)>) : type_(LAMBDA) {
this->f_ = new std::function<T(X...)>(std::move(f));
}