add as_span overload for basic_string which doesn't have nonconst .data() like other contiguous containers

This commit is contained in:
Elron A. Yellin
2015-11-20 17:50:02 -05:00
parent 04050a2162
commit e4d8d35af5
2 changed files with 17 additions and 0 deletions
+9
View File
@@ -203,6 +203,15 @@ SUITE(span_tests)
overloaded_func(av3.as_span(dim<>(1), dim<3>(), dim<5>()), 't');
}
{
string str;
span<char> strspan = as_span(str);
(void)strspan;
const string cstr;
span<const char> cstrspan = as_span(cstr);
(void)cstrspan;
}
{
int a[3][4][5];
auto av = as_span(a);