addressing travis errors

This commit is contained in:
Jordan Maples [MSFT]
2020-02-05 14:32:08 -08:00
parent 432be4852c
commit 7fcc142ffc
2 changed files with 11 additions and 6 deletions
+4 -4
View File
@@ -163,7 +163,7 @@ namespace details
constexpr span_iterator operator++(int) noexcept
{
span_iterator ret = {*this};
auto ret{*this};
++*this;
return ret;
}
@@ -178,7 +178,7 @@ namespace details
constexpr span_iterator operator--(int) noexcept
{
span_iterator ret = {*this};
auto ret{*this};
--*this;
return ret;
}
@@ -194,7 +194,7 @@ namespace details
constexpr span_iterator operator+(const difference_type n) const noexcept
{
span_iterator ret = {*this};
auto ret{*this};
return ret += n;
}
@@ -215,7 +215,7 @@ namespace details
constexpr span_iterator operator-(const difference_type n) const noexcept
{
span_iterator ret = {*this};
auto ret{*this};
return ret -= n;
}
+7 -2
View File
@@ -1102,8 +1102,13 @@ TEST(span_test, from_array_constructor)
{
span<int> s = a;
span<int> s2 = b;
EXPECT_DEATH(bool _ = (s.begin() == s2.begin()), deathstring);
EXPECT_DEATH(bool _ = (s.begin() <= s2.begin()), deathstring);
#if (__cplusplus > 201402L)
EXPECT_DEATH([[maybe_unused]] s.begin() == s2.begin(), deathstring);
EXPECT_DEATH([[maybe_unused]] s.begin() <= s2.begin(), deathstring);
#else
EXPECT_DEATH(s.begin() == s2.begin(), deathstring);
EXPECT_DEATH(s.begin() <= s2.begin(), deathstring);
#endif
}
}