mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Potential fix for issue ChaiScript#481
(bool cannot be stored in Boxed_Number)
This commit is contained in:
parent
a7dae37a23
commit
0e243b006a
@ -41,7 +41,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
Ret call(const Function_Params ¶ms, const Type_Conversions_State &t_state)
|
Ret call(const Function_Params ¶ms, const Type_Conversions_State &t_state)
|
||||||
{
|
{
|
||||||
if constexpr (std::is_arithmetic_v<Ret>) {
|
if constexpr (std::is_arithmetic_v<Ret> && !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ret>>, bool>) {
|
||||||
return Boxed_Number(dispatch::dispatch(m_funcs, params, t_state)).get_as<Ret>();
|
return Boxed_Number(dispatch::dispatch(m_funcs, params, t_state)).get_as<Ret>();
|
||||||
} else if constexpr (std::is_same_v<void, Ret>) {
|
} else if constexpr (std::is_same_v<void, Ret>) {
|
||||||
dispatch::dispatch(m_funcs, params, t_state);
|
dispatch::dispatch(m_funcs, params, t_state);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user