From: Yedidya Feldblum Date: Mon, 30 Oct 2017 21:52:50 +0000 (-0700) Subject: Simplify type_t X-Git-Tag: v2017.11.06.00~34 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=ffe039c4511c9771974ead5b25762b57955ff1da 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 --- diff --git a/folly/Traits.h b/folly/Traits.h index f513462a..fb797f37 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -220,15 +220,14 @@ using _t = typename T::type; */ namespace traits_detail { -template +template struct type_t_ { - template - using apply = T; + using type = T; }; } // namespace traits_detail template -using type_t = typename traits_detail::type_t_::template apply; +using type_t = typename traits_detail::type_t_::type; template using void_t = type_t;