From 9c95106af2fbaa9f5f8f605ee7df54cc90356df6 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 31 Dec 2019 16:54:49 +0100 Subject: new_type: implement addition via nt::Arithmetic --- doc/src/index.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') 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 \ + constexpr new_type operator+(new_type const & lhs, new_type const & rhs) + + **noexcept specification:** This input operator shall be noexcept iff. :cpp:type:`new_type::base_type` is nothrow addable as well as nothrow copy-constructible. + + **enablement:** This operator shall be available iff. a) :cpp:type:`new_type::base_type` is addable using the operator :literal:`+` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. + Header :literal:`` ========================================= -- cgit v1.2.3