SlickEdit Community
Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2015 v20 Beta Discussion => Topic started by: jej45 on October 26, 2015, 12:55:17 pm
-
consider the following snippet:
#include <map>
std::map<int, int> aMap;
std::map<int, int>::iterator itr = aMap.begin();
itr-> // get message "attempt to use operator '->', but itr is not a pointer"
-
I was able to reproduce this on Windows using a GNU-C project. I'll look into it.
-
This is fixed for the next drop.
-
thanks
-
BTW can you verify for the other containers, typedef and auto? Guess that I am being greedy.
E.g.
typedef std::vector<int>::iterator vecItr;
using vecItr = std::list<int>
std::list<int> aList;
auto itr = aList.begin();
auto itr = std
also,
-
Tested, worked. The local using statement uncovered a small Symbol Coloring bug which is now fixed.
-
thanks again :)
-
did this make it into RC4?
-
Yes, the fixes were in RC4, I just retested them. I had to clean up your second example a bit, but these cases do work. There may be some residual problems with newer Visual Studio configurations which I did not have available for testing, but I did confirm that all these examples do work when using Visual Studio 2010 includes.
#include <map>
void test33() {
std::map<int, int> aMap;
std::map<int, int>::iterator itr = aMap.begin();
itr->; // get message "attempt to use operator '->', but itr is not a pointer"
typedef std::vector<std::string>::iterator vecItr;
using listItr = std::vector<std::string>::iterator;
std::list<std::string> aList;
auto itr2 = aList.begin();
itr2->clear();
vecItr vitr;
vitr->app;
listItr litr;
litr->;
}
-
OK. I'm probably doing something wrong. I am running the linux 64-bit on Red Hat Enterprise Linux Server release 6.2 We aer using gcc 4.4.4. Will try it on Windows.
-
I was able to reproduce the problem on Windows when using a Visual Studio 2015 compiler tag file. They had done some more gyrations with the STL map template class that required more attention to handle.
I was not able to reproduce the problem on CentOS 6.6 with GCC 4.4.4 (the closest I had to RHEL 6.2 available). However, you should verify that your project is configured to use the GCC 4.4.4 tag file by default (or the "Unix Includes" tag file, which should include the 4.4.4 headers). Do this by checking Project > Project Properties > Compile/Link tab. And also verify that this tag file is built. Tools > Tag Files... > (select C/C++ compiler tag file) > Rebuild tag file > uncheck retag modified only, and wait for it to finish before testing.
The fix for Visual Studio 2015 will go into a future hot fix for SlickEdit 2015. It may also help with other STL implementations.