diff --git a/src/corelib/text/qstringtokenizer.cpp b/src/corelib/text/qstringtokenizer.cpp index f0efcc1371..44999425ae 100644 --- a/src/corelib/text/qstringtokenizer.cpp +++ b/src/corelib/text/qstringtokenizer.cpp @@ -245,7 +245,8 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template QStringTokenizer::const_iterator QStringTokenizer::begin() const + \fn template QStringTokenizer::iterator QStringTokenizer::begin() const + \fn template QStringTokenizer::iterator QStringTokenizer::cbegin() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first token in the list. @@ -253,14 +254,6 @@ QT_BEGIN_NAMESPACE \sa end(), cbegin() */ -/*! - \fn template QStringTokenizer::const_iterator QStringTokenizer::cbegin() const - - Same as begin(). - - \sa cend(), begin() -*/ - /*! \fn template QStringTokenizer::sentinel QStringTokenizer::end() const @@ -279,15 +272,15 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template template Container QStringTokenizer::toContainer(Container &&c) const & + \fn template template LContainer QStringTokenizer::toContainer(LContainer &&c) const & Converts the lazy sequence into a (typically) random-access container of - type \c Container. + type \c LContainer. This function is only available if \c Container has a \c value_type matching this tokenizer's value_type. - If you pass in a named container (an lvalue)for \a c, then that container + If you pass in a named container (an lvalue) for \a c, then that container is filled, and a reference to it is returned. If you pass in a temporary container (an rvalue, incl. the default argument), then that container is filled, and returned by value. @@ -310,11 +303,11 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template template Container QStringTokenizer::toContainer(Container &&c) const && + \fn template template RContainer QStringTokenizer::toContainer(RContainer &&c) const && \overload Converts the lazy sequence into a (typically) random-access container of - type \c Container. + type \c RContainer. In addition to the constraints on the lvalue-this overload, this rvalue-this overload is only available when this QStringTokenizer diff --git a/src/corelib/text/qstringtokenizer.h b/src/corelib/text/qstringtokenizer.h index d6944cbcae..f1da701af2 100644 --- a/src/corelib/text/qstringtokenizer.h +++ b/src/corelib/text/qstringtokenizer.h @@ -329,29 +329,25 @@ public: {} #ifdef Q_QDOC - template + template LContainer toContainer(LContainer &&c = {}) const & {} + template RContainer toContainer(RContainer &&c = {}) const && {} #else template, if_compatible_container = true> -#endif Container toContainer(Container &&c = {}) const & { for (auto e : *this) c.emplace_back(e); return std::move(c); } - -#ifdef Q_QDOC - template -#else template, if_compatible_container = true, if_haystack_not_pinned = true> -#endif Container toContainer(Container &&c = {}) const && { for (auto e : *this) c.emplace_back(e); return std::move(c); } +#endif }; namespace QtPrivate {