diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-22 18:58:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-22 18:58:26 +0000 |
commit | 70c808f5b7e1d9eaa3de872e162a25e956d4777e (patch) | |
tree | 4cc88fa5575a1905995fb17192529c67913f45a8 /include/llvm/ADT/Optional.h | |
parent | b7eb78409c5603c8f440c2585f23ebedf547e78d (diff) | |
download | external_llvm-70c808f5b7e1d9eaa3de872e162a25e956d4777e.zip external_llvm-70c808f5b7e1d9eaa3de872e162a25e956d4777e.tar.gz external_llvm-70c808f5b7e1d9eaa3de872e162a25e956d4777e.tar.bz2 |
An Optional<T> is pod-like if the inner type is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/Optional.h')
-rw-r--r-- | include/llvm/ADT/Optional.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index fd1da74..81d73ed 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -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. |