diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 12:56:56 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2020-01-02 12:56:56 +0100 |
| commit | b34cbb0fa7dcd783245d2d2b2352846579bbb77b (patch) | |
| tree | bb2c02511057900f5d6751337925f8cb451ccc1f /doc | |
| parent | 9c81cffc32a5e88ac9f81fe3d08c2a670efa79d2 (diff) | |
| download | newtype-b34cbb0fa7dcd783245d2d2b2352846579bbb77b.tar.xz newtype-b34cbb0fa7dcd783245d2d2b2352846579bbb77b.zip | |
new_type: implement division
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/index.rst | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst index 18e81f7..e8647c1 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -280,7 +280,7 @@ Arithmetic Operators 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. + **noexcept specification:** This 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`. @@ -289,7 +289,7 @@ Arithmetic Operators 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 subtractable as well as nothrow copy-constructible. + **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. **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is subtractable using the operator :literal:`-` and b) :cpp:type:`DerivationClause` includes :cpp:var:`Arithmetic`. @@ -298,10 +298,20 @@ Arithmetic Operators 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 multipliable as well as nothrow copy-constructible. + **noexcept specification:** This operator shall be noexcept iff. :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is nothrow multipliable as well as nothrow copy-constructible. **enablement:** This operator shall be available iff. a) :cpp:type:`new_type<BaseType, TagType, DerivationClause>::base_type` is multipliable 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 dividable as well as nothrow copy-constructible. + + **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`. + Header :literal:`<newtype/derivable.hpp>` ========================================= |
