зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1480457 Address template parameter shadowing r=aklotz
This code throws an error in clang on the inner MMPolicy: error: declaration of 'MMPolicy' shadows template parameter Notethat the template parameter is declared earlier at the class definition of ReadOnlyTargetFunction MozReview-Commit-ID: buLE9d22YS Differential Revision: https://phabricator.services.mozilla.com/D4571 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d8daa6fd7c
Коммит
45e0e41278
|
@ -808,8 +808,8 @@ private:
|
|||
template <typename T>
|
||||
struct ChasePointerHelper
|
||||
{
|
||||
template <typename MMPolicy>
|
||||
static T Result(const MMPolicy&, T aValue)
|
||||
template <typename MMPolicy_>
|
||||
static T Result(const MMPolicy_&, T aValue)
|
||||
{
|
||||
return aValue;
|
||||
}
|
||||
|
@ -818,10 +818,10 @@ private:
|
|||
template <typename T>
|
||||
struct ChasePointerHelper<T*>
|
||||
{
|
||||
template <typename MMPolicy>
|
||||
static auto Result(const MMPolicy& aPolicy, T* aValue)
|
||||
template <typename MMPolicy_>
|
||||
static auto Result(const MMPolicy_& aPolicy, T* aValue)
|
||||
{
|
||||
ReadOnlyTargetFunction<MMPolicy> ptr(aPolicy, aValue);
|
||||
ReadOnlyTargetFunction<MMPolicy_> ptr(aPolicy, aValue);
|
||||
return ptr.template ChasePointer<T>();
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче