diff --git a/include/chaiscript/chaiscript_defines.hpp b/include/chaiscript/chaiscript_defines.hpp index d5eb774a..30b8ce18 100644 --- a/include/chaiscript/chaiscript_defines.hpp +++ b/include/chaiscript/chaiscript_defines.hpp @@ -271,7 +271,7 @@ namespace chaiscript { template - [[nodiscard]] auto make_vector(T && ... t) + [[nodiscard]] auto make_vector(T &&... t) -> std::vector...>> { using container_type = std::vector...>>; diff --git a/include/chaiscript/dispatchkit/dispatchkit.hpp b/include/chaiscript/dispatchkit/dispatchkit.hpp index 3fcb38cd..c249f317 100644 --- a/include/chaiscript/dispatchkit/dispatchkit.hpp +++ b/include/chaiscript/dispatchkit/dispatchkit.hpp @@ -1303,8 +1303,8 @@ namespace chaiscript const auto lhssize = lhsparamtypes.size(); const auto rhssize = rhsparamtypes.size(); - constexpr const auto boxed_type = user_type(); - constexpr const auto boxed_pod_type = user_type(); + const auto boxed_type = user_type(); + const auto boxed_pod_type = user_type(); for (size_t i = 1; i < lhssize && i < rhssize; ++i) { diff --git a/include/chaiscript/dispatchkit/function_params.hpp b/include/chaiscript/dispatchkit/function_params.hpp index 090f7004..c8afaaf8 100644 --- a/include/chaiscript/dispatchkit/function_params.hpp +++ b/include/chaiscript/dispatchkit/function_params.hpp @@ -36,7 +36,7 @@ namespace chaiscript { template constexpr explicit Function_Params(const std::array &a) - : m_begin(std::begin(a)), m_end(std::end(a)) + : m_begin(&*std::begin(a)), m_end(&*std::end(a)) { } diff --git a/include/chaiscript/dispatchkit/proxy_functions.hpp b/include/chaiscript/dispatchkit/proxy_functions.hpp index d3c751ee..1bca55c9 100644 --- a/include/chaiscript/dispatchkit/proxy_functions.hpp +++ b/include/chaiscript/dispatchkit/proxy_functions.hpp @@ -77,7 +77,7 @@ namespace chaiscript std::vector convert(Function_Params t_params, const Type_Conversions_State &t_conversions) const { auto vals = t_params.to_vector(); - constexpr auto dynamic_object_type_info = user_type(); + const auto dynamic_object_type_info = user_type(); for (size_t i = 0; i < vals.size(); ++i) { const auto &name = m_types[i].first; @@ -117,7 +117,7 @@ namespace chaiscript // second result: needs conversions std::pair match(const Function_Params &vals, const Type_Conversions_State &t_conversions) const noexcept { - constexpr auto dynamic_object_type_info = user_type(); + const auto dynamic_object_type_info = user_type(); bool needs_conversion = false; if (!m_has_types) { return std::make_pair(true, needs_conversion); } @@ -252,9 +252,9 @@ namespace chaiscript static bool compare_type_to_param(const Type_Info &ti, const Boxed_Value &bv, const Type_Conversions_State &t_conversions) noexcept { - constexpr auto boxed_value_ti = user_type(); - constexpr auto boxed_number_ti = user_type(); - constexpr auto function_ti = user_type>(); + const auto boxed_value_ti = user_type(); + const auto boxed_number_ti = user_type(); + const auto function_ti = user_type>(); if (ti.is_undef() || ti.bare_equal(boxed_value_ti) @@ -757,7 +757,7 @@ namespace chaiscript { return false; } - constexpr auto class_type_info = user_type(); + const auto class_type_info = user_type(); return vals[0].get_type_info().bare_equal(class_type_info); } diff --git a/include/chaiscript/dispatchkit/register_function.hpp b/include/chaiscript/dispatchkit/register_function.hpp index 9a61bfe9..1faf59f6 100644 --- a/include/chaiscript/dispatchkit/register_function.hpp +++ b/include/chaiscript/dispatchkit/register_function.hpp @@ -34,7 +34,8 @@ namespace chaiscript // we now that the Param pack will have only one element, so we are safe expanding it here return Proxy_Function(chaiscript::make_shared...>>(std::forward(func))); } else if constexpr (Is_Member) { - auto call = [func = std::forward(func)](auto && obj, auto && ... param) noexcept(Is_Noexcept) -> decltype(auto) { + // TODO some kind of bug is preventing forwarding of this noexcept for the lambda + auto call = [func = std::forward(func)](auto && obj, auto && ... param) /* noexcept(Is_Noexcept) */ -> decltype(auto) { return (( get_first_param(Function_Params{}, obj).*func )(std::forward(param)...)); }; return Proxy_Function( diff --git a/include/chaiscript/dispatchkit/type_conversions.hpp b/include/chaiscript/dispatchkit/type_conversions.hpp index 9d07ddaa..c98cb8cb 100644 --- a/include/chaiscript/dispatchkit/type_conversions.hpp +++ b/include/chaiscript/dispatchkit/type_conversions.hpp @@ -388,7 +388,7 @@ namespace chaiscript template bool convertable_type() const noexcept { - constexpr auto type = user_type().bare_type_info(); + const auto type = user_type().bare_type_info(); return thread_cache().count(type) != 0; }