diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 13:15:53 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 13:15:53 +0100 |
| commit | 9a5d11d4c5701c8ad2e6aa1213cc9fd2937ccbc4 (patch) | |
| tree | c5fab3249e9b6c22cc4e4f03a9ac9f2d3c80e78d /doc | |
| parent | b34cbb0fa7dcd783245d2d2b2352846579bbb77b (diff) | |
| download | newtype-9a5d11d4c5701c8ad2e6aa1213cc9fd2937ccbc4.tar.xz newtype-9a5d11d4c5701c8ad2e6aa1213cc9fd2937ccbc4.zip | |
new_type: implement add-assign
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/index.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst index e8647c1..2694dba 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -287,6 +287,15 @@ 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 operator shall be noexcept iff. :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is nothrow add-assignable. + + **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is add-assignable using the operator :literal:`+=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. + +.. 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 operator shall be noexcept iff. :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is nothrow subtractable as well as nothrow copy-constructible. |
