diff options
author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-02-19 01:09:11 +0300 |
---|---|---|
committer | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2020-02-19 01:09:11 +0300 |
commit | f4c608fd39fe8129dfb2ea5e737e2aea6baf4519 (patch) | |
tree | 6c6f0e6896c9ac95a1e2266174a984597d52ed6a /tests | |
parent | 8ba6cb1074062fa4e55f6b10828a0745a6ff7f30 (diff) |
addressing comments
Diffstat (limited to 'tests')
-rw-r--r-- | tests/span_compatibility_tests.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/span_compatibility_tests.cpp b/tests/span_compatibility_tests.cpp index 57a85e7..0301ace 100644 --- a/tests/span_compatibility_tests.cpp +++ b/tests/span_compatibility_tests.cpp @@ -931,6 +931,8 @@ static_assert(!std::is_constructible<gsl::span<Base>, Derived (&)[3]>::value, "!std::is_constructible<gsl::span<Base>, Derived(&)[3]>"); static_assert(!std::is_constructible<gsl::span<Base>, std::array<Derived, 3>&>::value, "!std::is_constructible<gsl::span<Base>, std::array<Derived, 3>&>"); +static_assert(!std::is_constructible<gsl::span<Base>, std::vector<Derived>&>::value, + "!std::is_constructible<gsl::span<Base>, std::vector<Derived>&>"); static_assert(!std::is_constructible<gsl::span<Base>, const gsl::span<Derived>&>::value, "!std::is_constructible<gsl::span<Base>, const gsl::span<Derived>&>"); static_assert(!std::is_constructible<gsl::span<Base>, const gsl::span<Derived, 3>&>::value, @@ -1048,16 +1050,16 @@ static_assert(std::is_convertible<std::array<int, 3>&, gsl::span<const int>>::va static_assert(std::is_convertible<const std::array<int, 3>&, gsl::span<const int>>::value, "std::is_convertible<const std::array<int, 3>&, gsl::span<const int>>"); - - + + #if __cplusplus >= 201703l template <typename U, typename = void> -inline constexpr bool AsWritableBytesCompilesFor = false; +static constexpr bool AsWritableBytesCompilesFor = false; template <typename U> -inline constexpr bool AsWritableBytesCompilesFor<U, void_t<decltype(as_writable_bytes(declval<U>()))>> = +static constexpr bool AsWritableBytesCompilesFor<U, void_t<decltype(as_writable_bytes(declval<U>()))>> = true; - + static_assert(AsWritableBytesCompilesFor<gsl::span<int>>, "AsWritableBytesCompilesFor<gsl::span<int>>"); static_assert(AsWritableBytesCompilesFor<gsl::span<int, 9>>, |