diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 15:46:27 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 15:46:27 +0100 |
| commit | 6998183b580b60ac72f79b3ebc4f206fa35937ac (patch) | |
| tree | 239ed951133baa1c0b6345f32f844d296d7a5a83 /doc | |
| parent | 05abaa3d00393165e7794a150ad6c4b5ac5dd37e (diff) | |
| download | newtype-6998183b580b60ac72f79b3ebc4f206fa35937ac.tar.xz newtype-6998183b580b60ac72f79b3ebc4f206fa35937ac.zip | |
new_type: implement divide-assignment
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/index.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst index 4c13412..3ef593d 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -327,7 +327,7 @@ Arithmetic Operators **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is nothrow multiply-assignable. - **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is multiply-assignable using the operator :literal:`-=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. + **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is multiply-assignable using the operator :literal:`*=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. .. cpp:function:: template<typename BaseType, \ typename TagType, \ @@ -338,6 +338,15 @@ Arithmetic Operators **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is dividable 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 divide-assignable. + + **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is divide-assignable using the operator :literal:`/=` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. + Header :literal:`<newtype/derivable.hpp>` ========================================= |
