aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2019-12-31 16:54:49 +0100
committerFelix Morgner <felix.morgner@gmail.com>2019-12-31 16:54:55 +0100
commit9c95106af2fbaa9f5f8f605ee7df54cc90356df6 (patch)
treed3a65f48c4b63a63fa4615ab5f0c94c01680121c /doc
parent1cce84ccacccba82362ef16f8207a4e6d9fbc1fe (diff)
downloadnewtype-9c95106af2fbaa9f5f8f605ee7df54cc90356df6.tar.xz
newtype-9c95106af2fbaa9f5f8f605ee7df54cc90356df6.zip
new_type: implement addition via nt::Arithmetic
Diffstat (limited to 'doc')
-rw-r--r--doc/src/index.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst
index 60c6fdb..6c341c2 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -272,6 +272,18 @@ Stream I/O Operators
.. versionadded:: 1.0.0
+Arithmetic Operators
+~~~~~~~~~~~~~~~~~~~~
+
+.. cpp:function:: template<typename BaseType, \
+ typename TagType, \
+ auto DerivationClause> \
+ constexpr new_type<BaseType, TagType, DerivationClause> operator+(new_type<BaseType, TagType, DerivationClause> const & lhs, new_type<BaseType, TagType, DerivationClause> const & rhs)
+
+ **noexcept specification:** This input operator shall be noexcept iff. :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is nothrow addable as well as nothrow copy-constructible.
+
+ **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is addable using the operator :literal:`+` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`.
+
Header :literal:`<newtype/derivable.hpp>`
=========================================