From 85231da35a2b4ef20771f57a675f3ba45dac01bf Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 3 Jan 2020 14:49:23 +0100 Subject: doc: convert operator references to long format --- doc/src/index.rst | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/src/index.rst b/doc/src/index.rst index 62abd58..ce6df9e 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -393,7 +393,7 @@ Arithmetic Operators .. cpp:function:: template \ - constexpr new_type & operator+=(new_type const & lhs, new_type const & rhs) + constexpr new_type & operator+=(new_type & lhs, new_type const & rhs) **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type::base_type` is nothrow add-assignable. @@ -411,7 +411,7 @@ Arithmetic Operators .. cpp:function:: template \ - constexpr new_type & operator-=(new_type const & lhs, new_type const & rhs) + constexpr new_type & operator-=(new_type & lhs, new_type const & rhs) **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type::base_type` is nothrow subtract-assignable. @@ -429,7 +429,7 @@ Arithmetic Operators .. cpp:function:: template \ - constexpr new_type & operator*=(new_type const & lhs, new_type const & rhs) + constexpr new_type & operator*=(new_type & lhs, new_type const & rhs) **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type::base_type` is nothrow multiply-assignable. @@ -447,7 +447,7 @@ Arithmetic Operators .. cpp:function:: template \ - constexpr new_type & operator/=(new_type const & lhs, new_type const & rhs) + constexpr new_type & operator/=(new_type & lhs, new_type const & rhs) **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type::base_type` is nothrow divide-assignable. @@ -493,13 +493,28 @@ Standard derivation tags .. cpp:var:: auto constexpr Arithmetic = derivable{} - This tag enables the derivation of the arithmetic operators :cpp:func:`operator+`, :cpp:func:`operator-`, :cpp:func:`operator*`, :cpp:func:`operator/`, :cpp:func:`operator+=`, :cpp:func:`operator-=`, :cpp:func:`operator*=`, and :cpp:func:`operator/=` + This tag enables the derivation of the following arithmetic operators: + + * :cpp:func:`operator+(new_type const &, new_type const &) constexpr new_type operator+(new_type const & lhs, new_type const & rhs)>` + * :cpp:func:`operator-(new_type const &, new_type const &) constexpr new_type operator-(new_type const & lhs, new_type const & rhs)>` + * :cpp:func:`operator*(new_type const &, new_type const &) constexpr new_type operator*(new_type const & lhs, new_type const & rhs)>` + * :cpp:func:`operator/(new_type const &, new_type const &) constexpr new_type operator/(new_type const & lhs, new_type const & rhs)>` + * :cpp:func:`operator+=(new_type &, new_type const &) constexpr new_type & operator+=(new_type & lhs, new_type const & rhs)>` + * :cpp:func:`operator-=(new_type &, new_type const &) constexpr new_type & operator-=(new_type & lhs, new_type const & rhs)>` + * :cpp:func:`operator*=(new_type &, new_type const &) constexpr new_type & operator*=(new_type & lhs, new_type const & rhs)>` + * :cpp:func:`operator/=(new_type &, new_type const &) constexpr new_type & operator/=(new_type & lhs, new_type const & rhs)>` .. versionadded:: 1.0.0 .. cpp:var:: auto constexpr EqBase = derivable{} - This tag enables the derivation of "Equality comparison with base type" operators :cpp:func:`operator==(BaseType, new_type) constexpr bool nt::operator==(BaseType const &, new_type const &)>`, :cpp:func:`operator==(new_type, BaseType) constexpr bool nt::operator==(new_type const &, BaseType const &)>` :cpp:func:`operator!=(BaseType, new_type) constexpr bool nt::operator!=(BaseType const &, new_type const &)>`, and :cpp:func:`operator!=(new_type, BaseType) constexpr bool nt::operator!=(new_type const &, BaseType const &)>` + This tag enables the derivation of following "equality comparison with base type" operators: + + * :cpp:func:`operator==(BaseType const &, new_type const &) constexpr bool nt::operator==(BaseType const &, new_type const &)>` + * :cpp:func:`operator==(new_type const &, BaseType const &) constexpr bool nt::operator==(new_type const &, BaseType const &)>` + * :cpp:func:`operator!=(BaseType const &, new_type const &) constexpr bool nt::operator!=(BaseType const &, new_type const &)>` + * :cpp:func:`operator!=(new_type const &, BaseType const &) constexpr bool nt::operator!=(new_type const &, BaseType const &)>` + By virtue of its nature, deriving this feature compromises the strength of the given :cpp:class:`new_type`. .. versionadded:: 1.0.0 @@ -519,25 +534,36 @@ Standard derivation tags .. cpp:var:: auto constexpr Indirection = derivable{} - This tag enables the derivation of the "member access through pointer" operators :cpp:func:`new_type::operator->` + .. .. cpp:function:: constexpr BaseType operator->() noexcept + + .. **enablement:** This operator shall be available iff. this :cpp:class:`new_type`'s :cpp:var:`derivation_clause` contains :cpp:var:`Indirection` + + .. .. cpp:function:: constexpr BaseType const * operator->() const noexcept + + This tag enables the derivation of the "member access through pointer" operator :cpp:func:`operator->() ()()>` (both in :literal:`const` and non-:literal:`const` variants). .. versionadded:: 1.0.0 .. cpp:var:: auto constexpr Read = derivable{} - This tag enables the derivation of the "stream output" operator :cpp:func:`operator<<` + This tag enables the derivation of the "stream output" :cpp:func:`operator\<\<(std::basic_ostream &, new_type const &) ` .. versionadded:: 1.0.0 .. cpp:var:: auto constexpr Relational = derivable{} - This tag enables the derivation of the relational operators :cpp:func:`operator<`, :cpp:func:`operator>`, :cpp:func:`operator<=`, and :cpp:func:`operator>=` + This tag enables the derivation of the following relational operators: + + * :cpp:func:`operator\<(new_type const &, new_type const &) constexpr bool operator<(new_type const &, new_type const &)>` + * :cpp:func:`operator>(new_type const &, new_type const &) constexpr bool operator>(new_type const &, new_type const &)>` + * :cpp:func:`operator\<=(new_type const &, new_type const &) constexpr bool operator<=(new_type const &, new_type const &)>` + * :cpp:func:`operator>=(new_type const &, new_type const &) constexpr bool operator>=(new_type const &, new_type const &)>` .. versionadded:: 1.0.0 .. cpp:var:: auto constexpr Show = derivable{} - This tag enables the derivation of the "stream input" operator :cpp:func:`operator>>` + This tag enables the derivation of the "stream input" :cpp:func:`operator>>(std::basic_istream &, new_type &) >>` .. versionadded:: 1.0.0 -- cgit v1.2.3