Skip to content

Commit

Permalink
Merge branch 'issue/83_any' into sshirokov/83_any_no_copy_move
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Apr 22, 2024
2 parents b4f08f6 + 886a0d2 commit 804a31f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cetlvast/suites/unittest/test_pf20_span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,4 +997,17 @@ TEST(TestSpanCopyCtor, CopyCetlSpanToFromDynamic)
ASSERT_EQ(fixture.data(), subject.data());
}

TEST(TestSpanPtrTypes, ViewOfPointerArray)
{
const char* names[] {
"dan",
"doug",
"ernst",
"fred"
};
cetl::pf20::span<const char*> subject(names);
ASSERT_EQ(4, subject.size());
ASSERT_STREQ("doug", subject[1]);
}

} // namespace
1 change: 0 additions & 1 deletion include/cetl/pf20/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ class span<T, dynamic_extent>
// +----------------------------------------------------------------------+
// | Required Properties
// +----------------------------------------------------------------------+
static_assert(not std::is_pointer<T>::value, "Can not be a pointer type");
static_assert(sizeof(element_type) != 0u, "Must have non zero element size");

// +----------------------------------------------------------------------+
Expand Down

0 comments on commit 804a31f

Please sign in to comment.