Skip to content

Commit 3eb9b4f

Browse files
authored
Merge pull request #224 from stolyaroleh/master
Allow aggregate initialization in gen::construct and gen::makeUnique
2 parents dd54790 + 34b810c commit 3eb9b4f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/rapidcheck/gen/Build.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Gen<T> construct(Gen<Args>... gens) {
127127
[](std::tuple<Args...> &&argsTuple) {
128128
return rc::detail::applyTuple(
129129
std::move(argsTuple),
130-
[](Args &&... args) { return T(std::move(args)...); });
130+
[](Args &&... args) { return T{std::move(args)...}; });
131131
});
132132
}
133133

@@ -143,7 +143,7 @@ Gen<std::unique_ptr<T>> makeUnique(Gen<Args>... gens) {
143143
return rc::detail::applyTuple(
144144
std::move(argsTuple),
145145
[](Args &&... args) {
146-
return std::unique_ptr<T>(new T(std::move(args)...));
146+
return std::unique_ptr<T>(new T{std::move(args)...});
147147
});
148148
});
149149
}

0 commit comments

Comments
 (0)