Fixed rendering of member variables with alias to template or alias template (t00014)

This commit is contained in:
Bartek Kryza
2022-02-22 13:02:04 +01:00
parent e8ebaad6c6
commit 1a5a7aefcb
21 changed files with 355 additions and 109 deletions

View File

@@ -44,22 +44,21 @@ std::vector<std::string> split(std::string str, std::string delimiter)
{
std::vector<std::string> result;
while (str.size()) {
int index = str.find(delimiter);
if (index != std::string::npos) {
result.push_back(str.substr(0, index));
str = str.substr(index + delimiter.size());
if (str.size() == 0)
result.push_back(str);
}
else {
result.push_back(str);
str = "";
}
}
if (result.empty())
if (!contains(str, delimiter))
result.push_back(str);
else
while (str.size()) {
int index = str.find(delimiter);
if (index != std::string::npos) {
result.push_back(str.substr(0, index));
str = str.substr(index + delimiter.size());
}
else {
if (!str.empty())
result.push_back(str);
str = "";
}
}
return result;
}

View File

@@ -22,6 +22,7 @@
#include <algorithm>
#include <string.h>
#include <string>
#include <type_traits>
#include <vector>
namespace clanguml {
@@ -190,6 +191,9 @@ bool contains(const T &container, const E &element)
[&element](const auto &e) { return *e == *element; }) !=
container.end();
}
else if constexpr (std::is_same_v<std::remove_cv_t<T>, std::string>) {
return container.find(element) != std::string::npos;
}
else {
return std::find(container.begin(), container.end(), element) !=
container.end();