diff options
-rw-r--r-- | Source/cmDocumentationSection.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 276e520..e1b5454 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -4,11 +4,10 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <iterator> #include <string> #include <vector> -#include <cmext/algorithm> - #include "cmDocumentationEntry.h" // Low-level interface for custom documents: @@ -45,9 +44,12 @@ public: { this->Entries.push_back(entry); } - void Append(const std::vector<cmDocumentationEntry>& entries) + + template <typename Iterable> + void Append(const Iterable& entries) { - cm::append(this->Entries, entries); + this->Entries.insert(std::end(this->Entries), std::begin(entries), + std::end(entries)); } /** Append an entry to this section using NULL terminated chars */ @@ -56,10 +58,12 @@ public: /** prepend some documentation to this section */ void Prepend(const char* [][2]); - void Prepend(const std::vector<cmDocumentationEntry>& entries) + + template <typename Iterable> + void Prepend(const Iterable& entries) { - this->Entries.insert(this->Entries.begin(), entries.begin(), - entries.end()); + this->Entries.insert(std::begin(this->Entries), std::begin(entries), + std::end(entries)); } private: |