mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix handling of const return types #430
This commit is contained in:
parent
252ea8072d
commit
a999ea3692
@ -181,9 +181,9 @@ namespace chaiscript
|
||||
template<typename Ret>
|
||||
struct Handle_Return<const Ret>
|
||||
{
|
||||
static Boxed_Value handle(const Ret &r)
|
||||
static Boxed_Value handle(Ret r)
|
||||
{
|
||||
return Boxed_Value(std::cref(r));
|
||||
return Boxed_Value(std::move(r));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user