diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index 1418e45f..4e437e86 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -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] ---- @@ -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 1 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 1 if [code]#Dimensions < 3#. + a@ [source] ---- diff --git a/adoc/headers/id.h b/adoc/headers/id.h index 65bbe0b2..6bb89cb0 100644 --- a/adoc/headers/id.h +++ b/adoc/headers/id.h @@ -27,6 +27,10 @@ template 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; diff --git a/adoc/headers/range.h b/adoc/headers/range.h index abe664e9..10d34d78 100644 --- a/adoc/headers/range.h +++ b/adoc/headers/range.h @@ -24,6 +24,10 @@ template 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: +, -, *, /, %, <<, >>, &, |, ^, &&, ||, <, >, <=, >=