Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPP14.g4 bugfix - relational ops in template arguments
Consider the signature void TestFunc(vector< ClassA > args, vector < ClassB > args2) Right now this is parsed as - a declaration of a variable args2 - the type of args2 is vector <A, B> where A = (ClassA > args) B = (vector < B) i.e. a a template instantiation that has two relational expressions that are the arguments This stems from the priority order of the template argument list which is templateargument : constantexpression | typeid | idexpression; Changing the order to : typeid | constantexpression| idexpression; fixes this. Tested that this is the same behavior as observed in Microsoft c++ compiler, gcc, clang and icc.
- Loading branch information