An Optional<T> is pod-like if the inner type is.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 22 Feb 2013 18:58:26 +0000 (18:58 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 22 Feb 2013 18:58:26 +0000 (18:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175908 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Optional.h

index fd1da74bb79378da55ed7078135a6c38b80a762c..81d73ed8b99754250e170a76a389e4424ace2bd3 100644 (file)
@@ -142,6 +142,12 @@ template <typename T>
 struct simplify_type<Optional<T> >
   : public simplify_type<const Optional<T> > {};
 
+template <typename T> struct isPodLike;
+template <typename T> struct isPodLike<Optional<T> > {
+  // An Optional<T> is pod-like if T is.
+  static const bool value = isPodLike<T>::value;
+};
+
 /// \brief Poison comparison between two \c Optional objects. Clients needs to
 /// explicitly compare the underlying values and account for empty \c Optional
 /// objects.