@@ -2830,7 +2830,8 @@ class Environment {
28302830 using BasicArg = std::remove_const_t <
28312831 std::remove_pointer_t <std::remove_reference_t <std::decay_t <Arg>>>>;
28322832
2833- constexpr bool check = std::is_const_v<std::remove_reference_t <Arg>> ||
2833+ static constexpr bool check =
2834+ std::is_const_v<std::remove_reference_t <Arg>> ||
28342835 std::is_same_v<BasicArg, Arg>;
28352836 static_assert (check, " Arguments should be either const& or a value type" );
28362837
@@ -2848,7 +2849,8 @@ class Environment {
28482849 function_signature::ArgsList<Args...> /* args*/ ,
28492850 std::index_sequence<Is...> /* seq*/ ) {
28502851 add_callback (name, sizeof ...(Args),
2851- [func = std::move (func)](const Arguments &args) -> json {
2852+ [func = std::move (func)] //
2853+ ([[maybe_unused]] const Arguments &args) -> json {
28522854 if constexpr (std::is_same_v<Ret, void >) {
28532855 func (get_callback_argument<Args>(args, Is)...);
28542856 return {};
@@ -3016,17 +3018,18 @@ class Environment {
30163018 */
30173019 template <class Callback >
30183020 void add_callback (const std::string &name, Callback callback) {
3019- constexpr auto get_sig = [] {
3021+ static constexpr auto get_sig = [] {
30203022 if constexpr (std::is_class_v<Callback>) {
30213023 return function_signature::Get<decltype (&Callback::operator ())> {};
30223024 } else {
30233025 return function_signature::Get<Callback>{};
30243026 }
30253027 };
30263028 using Sig = decltype (get_sig ());
3027- constexpr size_t num_args = std::tuple_size_v<typename Sig::ArgsTuple>;
3029+ static constexpr size_t num_args =
3030+ std::tuple_size_v<typename Sig::ArgsTuple>;
30283031
3029- constexpr auto is_arguments_vector = [] {
3032+ static constexpr auto is_arguments_vector = [] {
30303033 if constexpr (num_args == 1 ) {
30313034 return std::is_same_v<
30323035 std::remove_cv_t <std::remove_reference_t <
0 commit comments