mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
add vector log
This commit is contained in:
parent
5cdfbc3e67
commit
7305445f05
1 changed files with 18 additions and 0 deletions
|
@ -71,6 +71,24 @@ namespace geode {
|
|||
return "nullopt";
|
||||
}
|
||||
|
||||
template <class T>
|
||||
requires requires(T t) {
|
||||
parse(t);
|
||||
}
|
||||
std::string parse(std::vector<T> const& thing) {
|
||||
std::string res = "[";
|
||||
bool first = true;
|
||||
for (auto& t : thing) {
|
||||
if (!first) {
|
||||
res += ", ";
|
||||
}
|
||||
first = false;
|
||||
res += parse(t);
|
||||
}
|
||||
res += "]";
|
||||
return res;
|
||||
}
|
||||
|
||||
template <class A, class B>
|
||||
requires requires(A a, B b) {
|
||||
parse(a);
|
||||
|
|
Loading…
Reference in a new issue