From bb58e65e6596a2ffac2e85e9fda1e8568aa9b4b1 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 25 Feb 2020 20:57:06 +0100 Subject: new_type: implement cbegin --- doc/src/index.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') 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 ` contains :cpp:var:`Iterable` and + b) this :cpp:class:`new_type`'s :cpp:type:`base type ` has a non-static member function :cpp:func:`cbegin() const ` 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 \ + constexpr new_type::const_iterator cbegin(new_type 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 ` contains :cpp:var:`Iterable` and + b) for the :cpp:class:`new_type`'s :cpp:type:`base type ` 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3