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:
David Major 2017-04-20 14:58:38 -04:00
Родитель 89ad1caece
Коммит c4a6792abb
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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);
}