This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | code model does not recognize type typeof(l.begin()) | ||
---|---|---|---|
Product: | cnd | Reporter: | dennisbot |
Component: | Code Model | Assignee: | issues@cnd <issues> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.0.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
dennisbot
2011-08-05 03:01:49 UTC
Example: #include <cstdlib> #include <map> #define foreach(it, l) for(typeof(l.begin()) it = l.begin(); it != l.end(); it++) using namespace std; int main(int argc, char** argv) { map<char, int> apariciones; int maxi; foreach(it, apariciones) { maxi = max(maxi, it->second); } for(map<char, int>::iterator it = apariciones.begin(); it != apariciones.end(); it++) { maxi = max(maxi, it->second); } return 0; } "typeof" is not a part of C++ standard. It some kind of "decltype" from C++11 alias. |