[llvm] r175908 - An Optional<T> is pod-like if the inner type is.

Benjamin Kramer benny.kra at googlemail.com
Fri Feb 22 10:58:26 PST 2013


Author: d0k
Date: Fri Feb 22 12:58:26 2013
New Revision: 175908

URL: http://llvm.org/viewvc/llvm-project?rev=175908&view=rev
Log:
An Optional<T> is pod-like if the inner type is.

Modified:
    llvm/trunk/include/llvm/ADT/Optional.h

Modified: llvm/trunk/include/llvm/ADT/Optional.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Optional.h?rev=175908&r1=175907&r2=175908&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Optional.h (original)
+++ llvm/trunk/include/llvm/ADT/Optional.h Fri Feb 22 12:58:26 2013
@@ -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.





More information about the llvm-commits mailing list