From 870b229124b47586577e332ed5439e63fda16a25 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 30 Dec 2019 00:19:34 +0100 Subject: doc: add version tags --- doc/src/index.rst | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/src/index.rst b/doc/src/index.rst index cf35ed9..60c6fdb 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -1,10 +1,9 @@ .. cpp:namespace-push:: nt -.. toctree:: - :maxdepth: 5 +.. only:: html -.. contents:: Table of Contents - :depth: 5 + .. contents:: Table of Contents + :depth: 5 ############# Documentation @@ -70,6 +69,8 @@ Class template :cpp:class:`new_type` The class template :cpp:class:`new_type` is designed to allow the creation of new types based on existing types. Similarly to the Haskell newtype, this class template creates a new type that is layout equivalent to the underlying type. + .. versionadded:: 1.0.0 + **Member Type Aliases** .. cpp:type:: base_type = BaseType @@ -175,6 +176,8 @@ Equality Comparison Operators **enablement:** This operator shall be available iff. :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`==` + .. versionadded:: 1.0.0 + .. cpp:function:: template \ @@ -185,6 +188,8 @@ Equality Comparison Operators **enablement:** This operator shall be available iff. this :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`!=` + .. versionadded:: 1.0.0 + Relational Comparison Operators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -198,6 +203,8 @@ Relational Comparison Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`<` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Relational`. + .. versionadded:: 1.0.0 + .. cpp:function:: template \ @@ -208,6 +215,8 @@ Relational Comparison Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`>` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Relational`. + .. versionadded:: 1.0.0 + .. cpp:function:: template \ @@ -218,6 +227,8 @@ Relational Comparison Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`<=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Relational`. + .. versionadded:: 1.0.0 + .. cpp:function:: template \ @@ -228,6 +239,8 @@ Relational Comparison Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` supports comparison using the operator :literal:`>=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Relational`. + .. versionadded:: 1.0.0 + Stream I/O Operators ~~~~~~~~~~~~~~~~~~~~ @@ -243,6 +256,8 @@ Stream I/O Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` supports being output to a stream using the operator :literal:`<<` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Show`. + .. versionadded:: 1.0.0 + .. cpp:function:: template::base_type` supports being read from a stream using the operator :literal:`>>` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Read`. + .. versionadded:: 1.0.0 + Header :literal:`` ========================================= @@ -266,6 +283,8 @@ Alias template :cpp:type:`derivable` .. cpp:type:: template \ derivable = type + .. versionadded:: 1.0.0 + .. _sec-standard-derivation-tags: Standard derivation tags @@ -275,32 +294,46 @@ Standard derivation tags 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/=` + .. versionadded:: 1.0.0 + .. cpp:var:: auto constexpr EqBase = derivable{} This tag enables the derivation of "Equality comparison with base type" operators :literal:`==` and :literal:`!=` By virtue of its nature, deriving this feature compromises the strength of the given :cpp:class:`new_type`. + .. versionadded:: 1.0.0 + .. cpp:var:: auto constexpr ImplicitConversion = derivable{} This tag enables the derivation of the implicit "conversion to base type" operator. By virtue of its nature, deriving this feature compromises the strength of the given :cpp:class:`new_type`. + .. versionadded:: 1.0.0 + .. cpp:var:: auto constexpr Indirection = derivable{} This tag enables the derivation of the "member access through pointer" operators :cpp:func:`new_type::operator->` + .. versionadded:: 1.0.0 + .. cpp:var:: auto constexpr Read = derivable{} This tag enables the derivation of the "stream output" operator :cpp:func:`operator<<` + .. 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>=` + .. versionadded:: 1.0.0 + .. cpp:var:: auto constexpr Show = derivable{} This tag enables the derivation of the "stream input" operator :cpp:func:`operator>>` + .. versionadded:: 1.0.0 + Header :literal:`` ======================================== @@ -313,7 +346,10 @@ Function template :cpp:func:`deriving` constexpr derivation_clause deriving(derivable... features) noexcept This function can be used to create a new :cpp:class:`derivation_clause` for use in the definitions of instances of :cpp:class:`new_type`. - See :ref:`sec-standard-derivation-tags` for a list of standard derivation tags. + + .. versionadded:: 1.0.0 + + .. seealso:: :ref:`sec-standard-derivation-tags` for a list of standard derivation tags Header :literal:`` ================================================= @@ -328,6 +364,8 @@ Class template :cpp:class:`derivation_clause` Derivation clauses are used by :cpp:class:`new_type` to allow users to specify a set of automatically derived support functions. + .. versionadded:: 1.0.0 + **Constructors** .. cpp:function:: constexpr derivation_clause(derivable...) noexcept -- cgit v1.2.3