diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2020-02-25 20:57:06 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2020-02-25 20:57:06 +0100 |
| commit | bb58e65e6596a2ffac2e85e9fda1e8568aa9b4b1 (patch) | |
| tree | e02730d64bd32c9b3251bc5d19448f197741ba12 /doc | |
| parent | 62ca586910736b5aba6d622ec27a7b00e3c37359 (diff) | |
| download | newtype-bb58e65e6596a2ffac2e85e9fda1e8568aa9b4b1.tar.xz newtype-bb58e65e6596a2ffac2e85e9fda1e8568aa9b4b1.zip | |
new_type: implement cbegin
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/index.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/src/index.rst b/doc/src/index.rst index 8ef515f..cd016b9 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -231,6 +231,17 @@ Class template :cpp:class:`new_type` .. versionadded:: 1.1.0 + .. cpp:function:: constexpr iterator cbegin() const + + Get a constant iterator to the beginning of the object contained by this :cpp:class:`new_type` + + :enablement: This function shall be available iff. + + a) this :cpp:class:`new_type`'s :cpp:var:`derivation clause <derivation_clause>` contains :cpp:var:`Iterable` and + b) this :cpp:class:`new_type`'s :cpp:type:`base type <base_type>` has a non-static member function :cpp:func:`cbegin() const <new_type::base_type::cbegin()>` that returns an instance of type :cpp:type:`const_iterator` + + .. versionadded:: 1.1.0 + :literal:`namespace`-level functions and function templates ----------------------------------------------------------- @@ -721,6 +732,24 @@ Iterators .. versionadded:: 1.1.0 +.. cpp:function:: template<typename BaseType, typename TagType, auto DerivationClause> \ + constexpr new_type<BaseType, TagType, DerivationClause>::const_iterator cbegin(new_type<BaseType, TagType, DerivationClause> const & obj) + + Get a constant iterator to the beginning of the object contained by an instance of :cpp:class:`new_type` + + :tparam BaseType: |BaseTypeDoc| + :tparam TagType: |TagTypeDoc| + :tparam DerivationClause: |DerivationClauseDoc| + :param obj: The object to retrieve the iterator from + :returns: An iterator to the begining of the object of contained by :cpp:var:`obj`. + :throws: Any exception + :enablement: This function shall be available iff. + + a) this :cpp:class:`new_type`'s :cpp:var:`derivation clause <DerivationClause>` contains :cpp:var:`Iterable` and + b) for the :cpp:class:`new_type`'s :cpp:type:`base type <BaseType>` exists a namespace-level function :literal:`cbegin(BaseType const &)` that returns an instance of type :cpp:type:`new_type::const_iterator` + + .. versionadded:: 1.1.0 + :cpp:class:`std::hash` Support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
