Skip to content

Commit

Permalink
Fix missing constexpr and device annotation for mapping ctors (#382)
Browse files Browse the repository at this point in the history
* Fix missing constexpr and device annotations for ctor

* Update include/experimental/__p0009_bits/layout_left.hpp

Review of @dalg24

Co-authored-by: Damien L-G <dalg24+github@gmail.com>

* Review of @dalg24

---------

Co-authored-by: Damien L-G <dalg24+github@gmail.com>
  • Loading branch information
tpadioleau and dalg24 authored Feb 26, 2025
1 parent d34b447 commit 74036ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/experimental/__p0009_bits/layout_left.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class layout_left::mapping {
)
)
MDSPAN_CONDITIONAL_EXPLICIT((!std::is_convertible_v<typename _Mapping::extents_type, extents_type>))
MDSPAN_INLINE_FUNCTION constexpr
mapping(const _Mapping& __other) noexcept
: __extents(__other.extents())
{
Expand Down
1 change: 1 addition & 0 deletions include/experimental/__p0009_bits/layout_right.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class layout_right::mapping {
MDSPAN_IMPL_PROPOSED_NAMESPACE::detail::is_layout_right_padded_mapping<_Mapping>::value
&& std::is_constructible_v<extents_type, typename _Mapping::extents_type>))
MDSPAN_CONDITIONAL_EXPLICIT((!std::is_convertible_v<typename _Mapping::extents_type, extents_type>))
MDSPAN_INLINE_FUNCTION constexpr
mapping(const _Mapping &__other) noexcept
: __extents(__other.extents())
{
Expand Down

0 comments on commit 74036ad

Please sign in to comment.