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

Simplify type_t

Summary:
[Folly] Simplify `type_t` by lifting the type to be aliased into the structure template parameter list.

May also fix curious build failures in some compilers.

Reviewed By: akrieger

Differential Revision: D6188953

fbshipit-source-id: 96e1c3af9c11959c0899c092933158922efa7e60
parent 46af81b6
......@@ -220,15 +220,14 @@ using _t = typename T::type;
*/
namespace traits_detail {
template <class...>
template <class T, class...>
struct type_t_ {
template <class T>
using apply = T;
using type = T;
};
} // namespace traits_detail
template <class T, class... Ts>
using type_t = typename traits_detail::type_t_<Ts...>::template apply<T>;
using type_t = typename traits_detail::type_t_<T, Ts...>::type;
template <class... Ts>
using void_t = type_t<void, Ts...>;
......
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