Skip to content

Commit 185fdec

Browse files
committed
Fixed for rvalues.
1 parent 6a1babb commit 185fdec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

parse/jsd_convenience.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ namespace JSON
2020
static_assert (Internal::can_parse<T>::value, "the object you try to parse has no applicable interface");
2121
}
2222

23+
template <typename T>
24+
T make_from_json(std::istream&& stream)
25+
{
26+
T res;
27+
JSON::parse(res, "", JSON::parse_json(stream));
28+
return res;
29+
}
30+
2331
template <typename T>
2432
T make_from_json(std::istream& stream)
2533
{

0 commit comments

Comments
 (0)