core: Add futurize::primise_type

This commit is contained in:
Tomasz Grabiec
2015-03-06 10:01:08 +01:00
parent f5485c667d
commit 422d642cf4

View File

@@ -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.