8000 Add support for *& return types · ChaiScript/ChaiScript@41c1c49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 41c1c49

Browse files
committed
Add support for *& return types
1 parent 1e62eb4 commit 41c1c49

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

include/chaiscript/dispatchkit/handle_return.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ namespace chaiscript
115115
}
116116
};
117117

118+
template<typename Ret>
119+
struct Handle_Return<Ret *&>
120+
{
121+
static Boxed_Value handle(Ret *p)
122+
{
123+
return Boxed_Value(p, true);
124+
}
125+
};
126+
127+
template<typename Ret>
128+
struct Handle_Return<const Ret *&>
129+
{
130+
static Boxed_Value handle(const Ret *p)
131+
{
132+
return Boxed_Value(p, true);
133+
}
134+
};
135+
118136
template<typename Ret>
119137
struct Handle_Return<Ret *>
120138
{

0 commit comments

Comments
 (0)
0