Fixed quite a few bugs, including makeing find template functions check for trait subset, not trait equality, and add the number required to the satisfied count. Based on what is now breaking, it looks like it's time to give the builtin functions types.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
|
||||
@@ -40,6 +41,14 @@ std::vector<T> slice(std::vector<T> vec, int begin, int end, int step = 1) {
|
||||
toReturn.push_back(vec[i]);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool subset(std::set<T> a, std::set<T> b) {
|
||||
for (auto i : a)
|
||||
if (b.find(i) == b.end())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
std::vector<std::string> split(std::string str, char delim) {
|
||||
std::stringstream stream(str);
|
||||
|
||||
Reference in New Issue
Block a user