Template Function sequant::opt::detail::option_engaged¶
Defined in File single_term_detail.hpp
Function Documentation¶
-
template<typename F>
constexpr bool sequant::opt::detail::option_engaged(F const &f)¶ Whether an “option-like” callable is engaged.
std::functionand function pointers report their non-empty state via contextual conversion to bool; any other callable (e.g. a plain lambda) has no empty state and is always engaged. This lets cost helpers accept either a (possibly empty)std::functionor a bare lambda for optional callables such asinner_pow, instead of requiring a bool-convertible type.