mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-02-07 10:19:57 +08:00
Fix for C2131: expression did not evaluate to a constant.
This commit is contained in:
parent
84df5918ce
commit
359a7d87c1
@ -1303,8 +1303,8 @@ namespace chaiscript
|
||||
const auto lhssize = lhsparamtypes.size();
|
||||
const auto rhssize = rhsparamtypes.size();
|
||||
|
||||
constexpr const auto boxed_type = user_type<Boxed_Value>();
|
||||
constexpr const auto boxed_pod_type = user_type<Boxed_Number>();
|
||||
constexpr auto const boxed_type = user_type<Boxed_Value>();
|
||||
constexpr auto const boxed_pod_type = user_type<Boxed_Number>();
|
||||
|
||||
for (size_t i = 1; i < lhssize && i < rhssize; ++i)
|
||||
{
|
||||
|
||||
@ -77,7 +77,7 @@ namespace chaiscript
|
||||
std::vector<Boxed_Value> 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<Dynamic_Object>();
|
||||
constexpr const auto dynamic_object_type_info = user_type<Dynamic_Object>();
|
||||
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<bool, bool> match(const Function_Params &vals, const Type_Conversions_State &t_conversions) const noexcept
|
||||
{
|
||||
constexpr auto dynamic_object_type_info = user_type<Dynamic_Object>();
|
||||
constexpr const auto dynamic_object_type_info = user_type<Dynamic_Object>();
|
||||
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<Boxed_Value>();
|
||||
constexpr auto boxed_number_ti = user_type<Boxed_Number>();
|
||||
constexpr auto function_ti = user_type<std::shared_ptr<const Proxy_Function_Base>>();
|
||||
constexpr const auto boxed_value_ti = user_type<Boxed_Value>();
|
||||
constexpr const auto boxed_number_ti = user_type<Boxed_Number>();
|
||||
constexpr const auto function_ti = user_type<std::shared_ptr<const Proxy_Function_Base>>();
|
||||
|
||||
if (ti.is_undef()
|
||||
|| ti.bare_equal(boxed_value_ti)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user