mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix bug #481
Applied solution sent by SG-Skril here: https://github.com/ChaiScript/ChaiScript/issues/481
This commit is contained in:
parent
a7dae37a23
commit
a3c033d1db
@ -41,7 +41,7 @@ namespace chaiscript
|
||||
|
||||
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_reference_t<std::remove_cv_t<Ret>>, bool>) {
|
||||
return Boxed_Number(dispatch::dispatch(m_funcs, params, t_state)).get_as<Ret>();
|
||||
} else if constexpr (std::is_same_v<void, Ret>) {
|
||||
dispatch::dispatch(m_funcs, params, t_state);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user