1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02: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:
Serge Guelton 2018-11-29 17:21:54 +00:00
parent 433144a780
commit 060a664bf5
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;