зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1358169: Fix Span.h constexprs for VS2017. r=froydnj
I can't speak for whether the MOZ_SPAN_GCC_CONSTEXPR on operator> is necessary, but I'm going on the assumption that any callers of it must also be in the same bucket of constexpr-ness.
This commit is contained in:
Родитель
89ad1caece
Коммит
c4a6792abb
12
mfbt/Span.h
12
mfbt/Span.h
|
@ -284,20 +284,20 @@ public:
|
|||
return lhs.index_ < rhs.index_;
|
||||
}
|
||||
|
||||
constexpr friend bool operator<=(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
MOZ_SPAN_GCC_CONSTEXPR friend bool operator<=(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
{
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
|
||||
constexpr friend bool operator>(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
MOZ_SPAN_GCC_CONSTEXPR friend bool operator>(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
{
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
constexpr friend bool operator>=(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
MOZ_SPAN_GCC_CONSTEXPR friend bool operator>=(const span_iterator& lhs,
|
||||
const span_iterator& rhs)
|
||||
{
|
||||
return !(rhs > lhs);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче