-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hello, please see the following:
static_assert(std::is_same<decltype(make_span(std::declval<int[5]>())),span<const int>>::value, "make_span Broken");
static_assert(std::is_same<decltype(make_span(std::declval<int(&)[5]>())),span<int,5>>::value, "make_span Broken");
static_assert(std::is_same<decltype(make_span(std::declval<const int[5]>())),span<const int,5>>::value, "make_span Broken");
static_assert(std::is_same<decltype(make_span(std::declval<const int(&)[5]>())),span<const int,5>>::value, "make_span Broken");
The first case returns a span with dynamic extent, while the other 3 return a span with a fixed size extent.
While non-const rvalue reference to C arrays almost never appear anywhere, this is a minor inconsistency and looks like a bug?
Metadata
Metadata
Assignees
Labels
No labels