Skip to content

Commit 022b92c

Browse files
committed
Deprecate accessor::max_size()
This function was added only to align accessor with the container interface. However, an accessor is not a container, and this has led to confusion regarding what this value should return.
1 parent cd200a4 commit 022b92c

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

adoc/chapters/programming_interface.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9453,8 +9453,10 @@ a@
94539453
----
94549454
size_type max_size() const noexcept
94559455
----
9456-
a@ Returns the maximum number of elements any accessor of this type would be
9457-
able to access.
9456+
a@ Deprecated.
9457+
9458+
Returns the maximum number of elements any accessor of this type would be able
9459+
to access.
94589460

94599461
a@
94609462
[source]

adoc/headers/accessorBuffer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class accessor {
137137

138138
size_type size() const noexcept;
139139

140+
// Deprecated
140141
size_type max_size() const noexcept;
141142

142143
// Deprecated

adoc/headers/accessorHost.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class host_accessor {
6969

7070
size_type size() const noexcept;
7171

72+
// Deprecated
7273
size_type max_size() const noexcept;
7374

7475
bool empty() const noexcept;

adoc/headers/accessorLocal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ template <typename DataT, int Dimensions = 1> class local_accessor {
3737

3838
size_type size() const noexcept;
3939

40+
// Deprecated
4041
size_type max_size() const noexcept;
4142

4243
bool empty() const noexcept;

0 commit comments

Comments
 (0)