Commit f4834763 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Remove unnecessary verbosity in DefaultMake

Summary: [Folly] Remove unnecessary verbosity in `DefaultMake`. The shorter version does just as well.

Reviewed By: andriigrynenko

Differential Revision: D13254005

fbshipit-source-id: 6520b813685a4621d8679b7feda24a1a0b75cfd5
parent 747f6e3c
...@@ -40,15 +40,8 @@ struct DefaultMake { ...@@ -40,15 +40,8 @@ struct DefaultMake {
std::is_move_constructible<T>>; std::is_move_constructible<T>>;
using type = std::conditional_t<is_returnable::value, T, Heap>; using type = std::conditional_t<is_returnable::value, T, Heap>;
T make(std::true_type) const {
return T();
}
Heap make(std::false_type) const {
return Heap();
}
type operator()() const { type operator()() const {
return make(is_returnable{}); return type();
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment