mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 12:17:02 +00:00
core: Add futurize::primise_type
This commit is contained in:
@@ -362,16 +362,19 @@ struct futurize;
|
||||
template <typename T>
|
||||
struct futurize {
|
||||
using type = future<T>;
|
||||
using promise_type = promise<T>;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct futurize<void> {
|
||||
using type = future<>;
|
||||
using promise_type = promise<>;
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
struct futurize<future<Args...>> {
|
||||
using type = future<Args...>;
|
||||
using promise_type = promise<Args...>;
|
||||
};
|
||||
|
||||
// Converts a type to a future type, if it isn't already.
|
||||
|
||||
Reference in New Issue
Block a user