mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Fix handling of const return types #430
This commit is contained in:
parent
252ea8072d
commit
5c9b16bdce
@ -181,9 +181,9 @@ namespace chaiscript
|
|||||||
template<typename Ret>
|
template<typename Ret>
|
||||||
struct Handle_Return<const 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