mirror of
https://github.com/microsoft/GSL.git
synced 2025-04-01 08:56:29 -04:00
non-const string::data() is available since C++17
This commit is contained in:
parent
6436dbfda0
commit
5251973839
@ -447,7 +447,7 @@ TEST(span_test, from_container_constructor)
|
||||
const std::string cstr = "hello";
|
||||
|
||||
{
|
||||
#ifdef FAIL_ON_SOME_PLATFORMS
|
||||
#if __cplusplus >= 201703L
|
||||
span<char> s{str};
|
||||
EXPECT_TRUE(s.size() == str.size());
|
||||
EXPECT_TRUE(s.data() == str.data());
|
||||
@ -1287,9 +1287,9 @@ static_assert(!CtorCompilesFor<span<int>, const std::vector<int>&&>,
|
||||
"!CtorCompilesFor<span<int>, const std::vector<int>&&>");
|
||||
#endif
|
||||
|
||||
#ifdef FAIL_ON_SOME_PLATFORMS
|
||||
static_assert(CtorCompilesFor<span<char>, std::string&>,
|
||||
"CtorCompilesFor<span<char>, std::string&>");
|
||||
#if __cplusplus < 201703L
|
||||
static_assert(!CtorCompilesFor<span<char>, std::string&>,
|
||||
"!CtorCompilesFor<span<char>, std::string&>");
|
||||
#endif
|
||||
static_assert(CtorCompilesFor<span<const char>, std::string&&>,
|
||||
"CtorCompilesFor<span<const char>, std::string&&>");
|
||||
|
Loading…
x
Reference in New Issue
Block a user