Commit 8c80ad9e authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Fix the forward declarations of F14 under MSVC

Summary:
Due to a quirk in how MSVC does name resolution, if a default value is declared in the forward declaration of a template, and the definition is made available in the same unit, the default values in the forward declaration must use the names given in the definition, not the declaration.
To keep it sane, just use the same template parameter names for both the declaration and definition.

(Note: this ignores all push blocking failures!)

Reviewed By: shixiao

Differential Revision: D7405057

fbshipit-source-id: dda14043fec30fa505bb0bb3e2e31d0abb52ba1f
parent 3f0f6c97
......@@ -22,35 +22,35 @@
namespace folly {
template <
typename K,
typename M,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<std::pair<K const, M>>>
typename Key,
typename Mapped,
typename Hasher = f14::DefaultHasher<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>>
class F14NodeMap;
template <
typename K,
typename M,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<std::pair<K const, M>>>
typename Key,
typename Mapped,
typename Hasher = std::hash<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>>
class F14ValueMap;
template <
typename K,
typename M,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<std::pair<K const, M>>>
typename Key,
typename Mapped,
typename Hasher = std::hash<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>>
class F14VectorMap;
template <
typename K,
typename M,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<std::pair<K const, M>>>
typename Key,
typename Mapped,
typename Hasher = std::hash<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>>
class F14FastMap;
} // namespace folly
......@@ -20,31 +20,31 @@
namespace folly {
template <
typename K,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<K>>
typename Key,
typename Hasher = f14::DefaultHasher<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<Key>>
class F14NodeSet;
template <
typename K,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<K>>
typename Key,
typename Hasher = f14::DefaultHasher<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<Key>>
class F14ValueSet;
template <
typename K,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<K>>
typename Key,
typename Hasher = f14::DefaultHasher<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<Key>>
class F14VectorSet;
template <
typename K,
typename H = f14::DefaultHasher<K>,
typename E = f14::DefaultKeyEqual<K>,
typename A = f14::DefaultAlloc<K>>
typename Key,
typename Hasher = f14::DefaultHasher<Key>,
typename KeyEqual = f14::DefaultKeyEqual<Key>,
typename Alloc = f14::DefaultAlloc<Key>>
class F14FastSet;
} // namespace folly
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