Let Baton methods be noexcept
[folly.git] / folly / Traits.h
index ebf69acf7e30628fe0f5d7b88811ad5966833e8d..fb797f377bb72a7f860180c8ea511066c15ce0c5 100644 (file)
@@ -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...>;
 
@@ -312,8 +311,9 @@ using is_trivially_copyable = std::is_trivially_copyable<T>;
 } // namespace traits_detail
 
 struct Ignore {
+  Ignore() = default;
   template <class T>
-  /* implicit */ Ignore(const T&) {}
+  constexpr /* implicit */ Ignore(const T&) {}
   template <class T>
   const Ignore& operator=(T const&) const { return *this; }
 };