aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2020-01-04 12:59:19 +0100
committerFelix Morgner <felix.morgner@gmail.com>2020-01-04 12:59:19 +0100
commitcf3473298ca31f0cd0348753b29bfc85368b614e (patch)
treea9e0196191978cae8e489845314185b1cb7fc84f
parent285d3d6f7e600a1a8a97cc22e68dcbb4a7102888 (diff)
downloadnewtype-cf3473298ca31f0cd0348753b29bfc85368b614e.tar.xz
newtype-cf3473298ca31f0cd0348753b29bfc85368b614e.zip
doc: document remaining new_type members
-rw-r--r--doc/src/index.rst50
1 files changed, 32 insertions, 18 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst
index 7d0ff4e..6f3e345 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -76,6 +76,8 @@ Class template :cpp:class:`new_type`
:tparam BaseType: |BaseTypeDoc|
:tparam TagType: |TagTypeDoc|
:tparam DerivationClause: |DerivationClauseDoc|
+
+ .. versionadded:: 1.0.0
**Member Type Aliases**
@@ -124,7 +126,7 @@ Class template :cpp:class:`new_type`
Construct a new instance of this :cpp:class:`new_type` by copy-constructing the contained object using :literal:`value`.
- :param other: An existing instance of this :cpp:class:`new_type`
+ :param value: An existing instance of this :cpp:class:`new_type`
:throws: Any exception thrown by the copy-constructor of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
This constructor shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow copy-construtible*.
:enablement: This constructor shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *copy-construtible*.
@@ -134,7 +136,7 @@ Class template :cpp:class:`new_type`
Construct a new instance of this :cpp:class:`new_type` by move-constructing the contained object using :literal:`value`.
- :param other: An existing instance of this :cpp:class:`new_type`
+ :param value: An existing instance of this :cpp:class:`new_type`
:throws: Any exception thrown by the move-constructor of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
This constructor shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow move-construtible*.
:enablement: This constructor shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *move-construtible*.
@@ -142,44 +144,56 @@ Class template :cpp:class:`new_type`
**Assignment Operators**
- .. cpp:function:: constexpr new_type & operator=(new_type const &)
+ .. cpp:function:: constexpr new_type & operator=(new_type const & other)
- **noexcept specification:** This assignment operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is nothrow copy-assignable.
+ Copy the value of an existing instance of this :cpp:class:`new_type` and replace this instance's value
- **default definition:** This assignment operator shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is copy-assignable.
- Otherwise, this assignment operator shall be explicitely deleted.
+ :param other: An existing instance of this :cpp:class:`new_type`
+ :throws: Any exception thrown by the copy-assignment operator of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
+ This operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow copy-assignable*.
+ :enablement: This operator shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *copy-assignable*.
+ Otherwise, this operator shall be explicitely deleted.
- .. cpp:function:: constexpr new_type & operator=(new_type &&)
+ .. cpp:function:: constexpr new_type & operator=(new_type && other)
- **noexcept specification:** This assignment operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is nothrow move-assignable.
+ Move the value of an existing instance of this :cpp:class:`new_type` and replace this instance's value
- **default definition:** This assignment operator shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is move-assignable.
- Otherwise, this assignment operator shall be explicitely deleted.
+ :param other: An existing instance of this :cpp:class:`new_type`
+ :throws: Any exception thrown by the move-assignment operator of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
+ This operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow move-assignable*.
+ :enablement: This operator shall be defined as :literal:`= default` iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *move-assignable*.
+ Otherwise, this operator shall be explicitely deleted.
**Accessors**
.. cpp:function:: constexpr BaseType decay() const
- **noexcept specification:** This member function shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is nothrow copy-assignable.
+ Retrieve the object contained by this :cpp:class:`new_type` object
+
+ :throws: Any exception thrown by the copy-constructor of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
+ This operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow copy-constructible*.
.. cpp:function:: constexpr operator BaseType() const
- **noexcept specification:** This conversion operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is nothrow copy-assignable.
+ Retrieve the object contained by this :cpp:class:`new_type` object
- **explicit specification:** This conversion operator shall be explicit unless this :cpp:class:`new_type`'s :cpp:var:`derivation_clause` contains :cpp:var:`ImplicitConversion`.
+ :throws: Any exception thrown by the copy-constructor of this :cpp:class:`new_type`'s :cpp:type:`base_type`.
+ This operator shall be noexcept iff. this :cpp:class:`new_type`'s :cpp:type:`base_type` is *nothrow copy-constructible*.
+ :explicit: This conversion operator shall be explicit unless this :cpp:class:`new_type`'s :cpp:var:`derivation clause <derivation_clause>` contains :cpp:var:`ImplicitConversion`.
- **Member Access Trough Pointer**
+ **Member Access Through Pointer**
.. 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`
+ Perform "member access through pointer" via a pointer to object contained by this :cpp:class:`new_type`
+
+ :enablement: This operator shall be available iff. this :cpp:class:`new_type`'s :cpp:var:`derivation clause <derivation_clause>` contains :cpp:var:`Indirection`
.. cpp:function:: constexpr BaseType const * operator->() const noexcept
- **enablement:** This operator shall be available iff. this :cpp:class:`new_type`'s :cpp:var:`derivation_clause` contains :cpp:var:`Indirection`
-
- .. versionadded:: 1.0.0
+ Perform "member access through pointer" via a pointer to object contained by this :cpp:class:`new_type`
+ :enablement: This operator shall be available iff. this :cpp:class:`new_type`'s :cpp:var:`derivation clause <derivation_clause>` contains :cpp:var:`Indirection`
:literal:`namespace`-level functions and function templates
-----------------------------------------------------------