cxx
cxx copied to clipboard
Bridge function parameter named `this` gives C++ compiler error
Because the std library set the precedence of calling a parameter this instead of self when necessary, I do the same. (For examples, search for (this on the Rc docs page.) Only that this, when used in a CXX bridge as a function parameter, leads to C++ compiler syntax errors () misses before this etc. in bridge_filename.rs.cc).
Of course, this can be expected to happen with other C++ keywords also. So, maybe there needs to be some sanitization and either early, friendlier bridge errors or automatic renaming (adding underscores?).