mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Avoid redundant reference to isPodLike in SmallVect/Optional implementation
NFC, preparatory work for isPodLike cleaning. Differential Revision: https://reviews.llvm.org/D55005 llvm-svn: 347890
This commit is contained in:
parent
433144a780
commit
060a664bf5
@ -29,7 +29,7 @@ namespace llvm {
|
||||
|
||||
namespace optional_detail {
|
||||
/// Storage for any type.
|
||||
template <typename T, bool IsPodLike> struct OptionalStorage {
|
||||
template <typename T, bool = isPodLike<T>::value> struct OptionalStorage {
|
||||
AlignedCharArrayUnion<T> storage;
|
||||
bool hasVal = false;
|
||||
|
||||
@ -111,7 +111,7 @@ template <typename T, bool IsPodLike> struct OptionalStorage {
|
||||
} // namespace optional_detail
|
||||
|
||||
template <typename T> class Optional {
|
||||
optional_detail::OptionalStorage<T, isPodLike<T>::value> Storage;
|
||||
optional_detail::OptionalStorage<T> Storage;
|
||||
|
||||
public:
|
||||
using value_type = T;
|
||||
|
@ -182,7 +182,7 @@ public:
|
||||
|
||||
/// SmallVectorTemplateBase<isPodLike = false> - This is where we put method
|
||||
/// implementations that are designed to work with non-POD-like T's.
|
||||
template <typename T, bool isPodLike>
|
||||
template <typename T, bool = isPodLike<T>::value>
|
||||
class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> {
|
||||
protected:
|
||||
SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {}
|
||||
@ -320,8 +320,8 @@ public:
|
||||
/// This class consists of common code factored out of the SmallVector class to
|
||||
/// reduce code duplication based on the SmallVector 'N' template parameter.
|
||||
template <typename T>
|
||||
class SmallVectorImpl : public SmallVectorTemplateBase<T, isPodLike<T>::value> {
|
||||
using SuperClass = SmallVectorTemplateBase<T, isPodLike<T>::value>;
|
||||
class SmallVectorImpl : public SmallVectorTemplateBase<T> {
|
||||
using SuperClass = SmallVectorTemplateBase<T>;
|
||||
|
||||
public:
|
||||
using iterator = typename SuperClass::iterator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user