Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11977,6 +11977,30 @@ size_t operator[](int dimension) const
a@ Return the value of the specified dimension of the
[code]#range#.

a@
[source]
----
size_t x() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 1# of the [code]#range#
object.

a@
[source]
----
size_t y() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 2# of the [code]#range#
object, or 1 if [code]#Dimensions < 2#.

a@
[source]
----
size_t z() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 3# of the [code]#range#
object, or 1 if [code]#Dimensions < 3#.

a@
[source]
----
Expand Down Expand Up @@ -12322,6 +12346,30 @@ size_t operator[](int dimension) const
a@ Return the value of the requested dimension of the [code]#id#
object.

a@
[source]
----
size_t x() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 1# of the [code]#id#
object.

a@
[source]
----
size_t y() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 2# of the [code]#id#
object, or 0 if [code]#Dimensions < 2#.

a@
[source]
----
size_t z() const noexcept
----
a@ Return the value of dimension [code]#Dimensions - 3# of the [code]#id#
object, or 0 if [code]#Dimensions < 3#.

a@
[source]
----
Expand Down
4 changes: 4 additions & 0 deletions adoc/headers/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ template <int Dimensions = 1> class id {
size_t& operator[](int dimension);
size_t operator[](int dimension) const;

size_t x() const noexcept;
size_t y() const noexcept;
size_t z() const noexcept;

// only available if Dimensions == 1
operator size_t() const;

Expand Down
4 changes: 4 additions & 0 deletions adoc/headers/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ template <int Dimensions = 1> class range {
size_t& operator[](int dimension);
size_t operator[](int dimension) const;

size_t x() const noexcept;
size_t y() const noexcept;
size_t z() const noexcept;

size_t size() const;

// OP is: +, -, *, /, %, <<, >>, &, |, ^, &&, ||, <, >, <=, >=
Expand Down