[clangd] Use std::decay_t (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 21:59:23 +0000 (14:59 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 21:59:23 +0000 (14:59 -0700)
clang-tools-extra/clangd/support/Context.h
clang-tools-extra/clangd/support/Function.h

index 926add1..2f403ae 100644 (file)
@@ -155,7 +155,7 @@ private:
   };
 
   template <class T> class TypedAnyStorage : public Context::AnyStorage {
-    static_assert(std::is_same<typename std::decay<T>::type, T>::value,
+    static_assert(std::is_same<std::decay_t<T>, T>::value,
                   "Argument to TypedAnyStorage must be decayed");
 
   public:
@@ -200,7 +200,7 @@ private:
 class [[nodiscard]] WithContextValue {
 public:
   template <typename T>
-  WithContextValue(const Key<T> &K, typename std::decay<T>::type V)
+  WithContextValue(const Key<T> &K, std::decay_t<T> V)
       : Restore(Context::current().derive(K, std::move(V))) {}
 
   // Anonymous values can be used for the destructor side-effect.
index dc9216b..5437729 100644 (file)
@@ -93,7 +93,7 @@ public:
   }
 
 private:
-  static_assert(std::is_same<typename std::decay<T>::type, T>::value,
+  static_assert(std::is_same<std::decay_t<T>, T>::value,
                 "use a plain type: event values are always passed by const&");
 
   std::recursive_mutex ListenersMu;