Commit 1de92cd7 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Work around member alias bugs in some compilers in F14Policy.h

Summary:
[Folly] Work around member alias bugs in some compilers in `F14Policy.h`.

MSVC appears to have a hard time with some cases of `using typename Base::MemberAlias;` - replace with `using MemberAlias = typename Base::MemberAlias;`.

Reviewed By: shixiao

Differential Revision: D9478688

fbshipit-source-id: 5cbf63839cc2b3a085ed633cc4e5703d61990033
parent d3fe49a0
......@@ -375,13 +375,13 @@ using ValueContainerIteratorBase = BaseIter<
template <typename ValuePtr>
class ValueContainerIterator : public ValueContainerIteratorBase<ValuePtr> {
using Super = ValueContainerIteratorBase<ValuePtr>;
using typename Super::ItemIter;
using typename Super::ValueConstPtr;
using ItemIter = typename Super::ItemIter;
using ValueConstPtr = typename Super::ValueConstPtr;
public:
using typename Super::pointer;
using typename Super::reference;
using typename Super::value_type;
using pointer = typename Super::pointer;
using reference = typename Super::reference;
using value_type = typename Super::value_type;
ValueContainerIterator() = default;
ValueContainerIterator(ValueContainerIterator const&) = default;
......@@ -454,14 +454,14 @@ class ValueContainerPolicy : public BasePolicy<
KeyEqualOrVoid,
AllocOrVoid,
SetOrMapValueType<Key, MappedTypeOrVoid>>;
using typename Super::Alloc;
using typename Super::AllocTraits;
using typename Super::Item;
using typename Super::ItemIter;
using typename Super::Value;
using Alloc = typename Super::Alloc;
using AllocTraits = typename Super::AllocTraits;
using Item = typename Super::Item;
using ItemIter = typename Super::ItemIter;
using Value = typename Super::Value;
private:
using typename Super::ByteAlloc;
using ByteAlloc = typename Super::ByteAlloc;
using Super::kIsMap;
......@@ -616,13 +616,13 @@ class NodeContainerPolicy;
template <typename ValuePtr>
class NodeContainerIterator : public BaseIter<ValuePtr, NonConstPtr<ValuePtr>> {
using Super = BaseIter<ValuePtr, NonConstPtr<ValuePtr>>;
using typename Super::ItemIter;
using typename Super::ValueConstPtr;
using ItemIter = typename Super::ItemIter;
using ValueConstPtr = typename Super::ValueConstPtr;
public:
using typename Super::pointer;
using typename Super::reference;
using typename Super::value_type;
using pointer = typename Super::pointer;
using reference = typename Super::reference;
using value_type = typename Super::value_type;
NodeContainerIterator() = default;
NodeContainerIterator(NodeContainerIterator const&) = default;
......@@ -706,14 +706,14 @@ class NodeContainerPolicy
std::is_void<MappedTypeOrVoid>::value,
Key,
MapValueType<Key, MappedTypeOrVoid>>>>>::pointer>;
using typename Super::Alloc;
using typename Super::AllocTraits;
using typename Super::Item;
using typename Super::ItemIter;
using typename Super::Value;
using Alloc = typename Super::Alloc;
using AllocTraits = typename Super::AllocTraits;
using Item = typename Super::Item;
using ItemIter = typename Super::ItemIter;
using Value = typename Super::Value;
private:
using typename Super::ByteAlloc;
using ByteAlloc = typename Super::ByteAlloc;
using Super::kIsMap;
......@@ -853,12 +853,12 @@ class VectorContainerPolicy;
template <typename ValuePtr>
class VectorContainerIterator : public BaseIter<ValuePtr, uint32_t> {
using Super = BaseIter<ValuePtr, uint32_t>;
using typename Super::ValueConstPtr;
using ValueConstPtr = typename Super::ValueConstPtr;
public:
using typename Super::pointer;
using typename Super::reference;
using typename Super::value_type;
using pointer = typename Super::pointer;
using reference = typename Super::reference;
using value_type = typename Super::value_type;
VectorContainerIterator() = default;
VectorContainerIterator(VectorContainerIterator const&) = default;
......@@ -944,16 +944,16 @@ class VectorContainerPolicy : public BasePolicy<
KeyEqualOrVoid,
AllocOrVoid,
uint32_t>;
using typename Super::Alloc;
using typename Super::AllocTraits;
using typename Super::ByteAlloc;
using typename Super::ByteAllocTraits;
using typename Super::BytePtr;
using typename Super::Hasher;
using typename Super::Item;
using typename Super::ItemIter;
using typename Super::KeyEqual;
using typename Super::Value;
using Alloc = typename Super::Alloc;
using AllocTraits = typename Super::AllocTraits;
using ByteAlloc = typename Super::ByteAlloc;
using ByteAllocTraits = typename Super::ByteAllocTraits;
using BytePtr = typename Super::BytePtr;
using Hasher = typename Super::Hasher;
using Item = typename Super::Item;
using ItemIter = typename Super::ItemIter;
using KeyEqual = typename Super::KeyEqual;
using Value = typename Super::Value;
using Super::kAllocIsAlwaysEqual;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment