|
| 1 | +diff --git a/absl/container/internal/common.h b/absl/container/internal/common.h |
| 2 | +index 5ef6c569..86de28c6 100644 |
| 3 | +--- a/absl/container/internal/common.h |
| 4 | ++++ b/absl/container/internal/common.h |
| 5 | +@@ -68,6 +68,13 @@ struct IfRRef<T&&> { |
| 6 | + using AddPtr = Other*; |
| 7 | + }; |
| 8 | + |
| 9 | ++// Workaround for NVCC (cudafe++) which fails to parse |
| 10 | ++// `IfRRef<concrete_type>::AddPtr<Dependent>` when used as a template argument |
| 11 | ++// inside a heavily macro-expanded template parameter list. Top-level alias |
| 12 | ++// defers the member-template lookup outside the surrounding template-id. |
| 13 | ++template <class T, class Other> |
| 14 | ++using IfRRefAddPtr = typename IfRRef<T>::template AddPtr<Other>; |
| 15 | ++ |
| 16 | + template <class, class = void> |
| 17 | + struct IsTransparent : std::false_type {}; |
| 18 | + template <class T> |
| 19 | +diff --git a/absl/container/internal/raw_hash_map.h b/absl/container/internal/raw_hash_map.h |
| 20 | +index b42a4f22..540788b7 100644 |
| 21 | +--- a/absl/container/internal/raw_hash_map.h |
| 22 | ++++ b/absl/container/internal/raw_hash_map.h |
| 23 | +@@ -106,8 +106,8 @@ class raw_hash_map : public raw_hash_set<Policy, Hash, Eq, Alloc> { |
| 24 | + typename K = key_type, class V = mapped_type, \ |
| 25 | + ABSL_INTERNAL_IF_##KValue##_NOR_##VValue( \ |
| 26 | + int = (EnableIf<LifetimeBoundKV<K, KValue, V, VValue, \ |
| 27 | +- IfRRef<int KQual>::AddPtr<K>, \ |
| 28 | +- IfRRef<int VQual>::AddPtr<V>>>()), \ |
| 29 | ++ IfRRefAddPtr<int KQual, K>, \ |
| 30 | ++ IfRRefAddPtr<int VQual, V>>>()), \ |
| 31 | + ABSL_INTERNAL_SINGLE_ARG( \ |
| 32 | + int &..., \ |
| 33 | + decltype(EnableIf<LifetimeBoundKV<K, KValue, V, VValue>>()) = \ |
| 34 | +diff --git a/absl/container/internal/btree_container.h b/absl/container/internal/btree_container.h |
| 35 | +index 21f00ae4..0a017f9f 100644 |
| 36 | +--- a/absl/container/internal/btree_container.h |
| 37 | ++++ b/absl/container/internal/btree_container.h |
| 38 | +@@ -497,8 +497,8 @@ class btree_map_container : public btree_set_container<Tree> { |
| 39 | + typename K = key_type, class M, \ |
| 40 | + ABSL_INTERNAL_IF_##KValue##_NOR_##MValue( \ |
| 41 | + int = (EnableIf<LifetimeBoundKV<K, KValue, M, MValue, \ |
| 42 | +- IfRRef<int KQual>::AddPtr<K>, \ |
| 43 | +- IfRRef<int MQual>::AddPtr<M>>>()), \ |
| 44 | ++ IfRRefAddPtr<int KQual, K>, \ |
| 45 | ++ IfRRefAddPtr<int MQual, M>>>()), \ |
| 46 | + ABSL_INTERNAL_SINGLE_ARG( \ |
| 47 | + int &..., \ |
| 48 | + decltype(EnableIf<LifetimeBoundKV<K, KValue, M, MValue>>()) = \ |
| 49 | +@@ -598,10 +598,10 @@ class btree_map_container : public btree_set_container<Tree> { |
| 50 | + ABSL_INTERNAL_IF_##KValue( \ |
| 51 | + class... Args, \ |
| 52 | + int = (EnableIf< \ |
| 53 | +- LifetimeBoundK<K, KValue, IfRRef<int KQual>::AddPtr<K>>>())), \ |
| 54 | ++ LifetimeBoundK<K, KValue, IfRRefAddPtr<int KQual, K>>>())), \ |
| 55 | + ABSL_INTERNAL_IF_##KValue( \ |
| 56 | + decltype(EnableIf<LifetimeBoundK< \ |
| 57 | +- K, KValue, IfRRef<int KQual>::AddPtr<K>>>()) = 0, \ |
| 58 | ++ K, KValue, IfRRefAddPtr<int KQual, K>>>()) = 0, \ |
| 59 | + class... Args), \ |
| 60 | + std::enable_if_t<!std::is_convertible<K, const_iterator>::value, int> = \ |
| 61 | + 0> \ |
0 commit comments