Skip to content

Commit 8cc553f

Browse files
committed
more doc
1 parent 6b3de66 commit 8cc553f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

include/boost/multi/array_ref.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,6 @@ struct const_subarray : array_types<T, D, ElementPtr, Layout> {
18521852
using cursor = cursor_t<typename const_subarray::element_ptr, D, typename const_subarray::strides_type>; ///< Cursor for access to the array, the cursor is indexable, and it has pointer semantics (returned by `home`)
18531853
using const_cursor = cursor_t<typename const_subarray::element_const_ptr, D, typename const_subarray::strides_type>; ///< Cursor for constant access to the array
18541854

1855-
private:
18561855
BOOST_MULTI_HD constexpr auto home_aux_() const { return cursor(this->base_, this->strides()); }
18571856

18581857
public:
@@ -2129,11 +2128,13 @@ class subarray : public const_subarray<T, D, ElementPtr, Layout> {
21292128
using typename const_subarray<T, D, ElementPtr, Layout>::element_ptr;
21302129
using typename const_subarray<T, D, ElementPtr, Layout>::element_const_ptr;
21312130

2131+
/// `multi::subarray<T, D - 1, P>` or, for `D == 1`, `std::pointer_traits<P>::reference` (usually `T&`)
21322132
using reference = typename std::conditional_t<
21332133
(D > 1),
21342134
subarray<element, D - 1, element_ptr>,
21352135
typename std::iterator_traits<element_ptr>::reference>;
21362136

2137+
/// `multi::const_subarray<T, D - 1, P>` or, for `D == 1`, `std::pointer_traits<P>::rebind<T const>::reference` (usually `T const&`)
21372138
using const_reference = typename std::conditional_t<
21382139
(D > 1),
21392140
const_subarray<element, D - 1, element_ptr>,
@@ -3001,7 +3002,9 @@ struct const_subarray<T, 1, ElementPtr, Layout> // NOLINT(fuchsia-multiple-inhe
30013002
using element_ref = typename types::element_ref;
30023003
using element_cref = typename std::iterator_traits<element_const_ptr>::reference;
30033004

3005+
/// `std::allocator_traits<Allocator>::const_pointer` for 1D arrays
30043006
using const_pointer = element_const_ptr;
3007+
/// `std::allocator_traits<Allocator>::pointer` for 1D arrays
30053008
using pointer = element_ptr;
30063009
using const_reference = typename array_types<T, dimensionality_type{1}, ElementPtr, Layout>::const_reference;
30073010
using reference = typename array_types<T, dimensionality_type{1}, ElementPtr, Layout>::reference;

include/boost/multi/detail/layout.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,8 @@ struct layout_t
14811481
using sub_type = layout_t<D - 1>;
14821482
using size_type = SSize;
14831483
using difference_type = std::make_signed_t<size_type>;
1484+
1485+
/// indexing type in the leading dimension (usually `std::ptrdiff_t`)
14841486
using index = difference_type;
14851487

14861488
using index_extension = multi::index_extension;

0 commit comments

Comments
 (0)