Some bugfixes, allow overloading of [] and add that to vector and string, work on regex. Need closures before that finishes....

This commit is contained in:
Nathan Braswell
2015-06-08 21:47:02 -04:00
parent 69048ebc31
commit 47bc52f00c
19 changed files with 188 additions and 48 deletions

View File

@@ -972,7 +972,8 @@ NodeTree<ASTData>* ASTTransformation::templateClassLookup(NodeTree<ASTData>* sco
int typeIndex = 0;
int currentTraitsSatisfied = 0;
for (auto j : nameTraitsPairs) {
if (!subset(j.second, templateInstantiationTypes[typeIndex]->traits)) {
// error out if not subset, or if we're a pointer but should have traits
if (!subset(j.second, templateInstantiationTypes[typeIndex]->traits) || (templateInstantiationTypes[typeIndex]->getIndirection() && j.second.size())) {
traitsEqual = false;
std::cout << "Traits not subset for " << j.first << " and " << templateInstantiationTypes[typeIndex]->toString() << ": ";
//std::cout << baseType << " " << indirection << " " << typeDefinition << " " << templateDefinition << " " << traits << ;
@@ -1137,7 +1138,8 @@ NodeTree<ASTData>* ASTTransformation::templateFunctionLookup(NodeTree<ASTData>*
int typeIndex = 0;
int currentTraitsSatisfied = 0;
for (auto j : nameTraitsPairs) {
if (!subset(j.second, templateInstantiationTypesPerFunction[i][typeIndex]->traits)) {
// error out if not subset, or if we're a pointer but should have traits
if (!subset(j.second, templateInstantiationTypesPerFunction[i][typeIndex]->traits) || (templateInstantiationTypesPerFunction[i][typeIndex]->getIndirection() && j.second.size())) {
traitsEqual = false;
std::cout << "Traits not a subset for " << j.first << " and " << templateInstantiationTypesPerFunction[i][typeIndex]->toString() << ": |";
std::copy(j.second.begin(), j.second.end(), std::ostream_iterator<std::string>(std::cout, " "));