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: | typename in for-loop leads to unresolved identifier error | ||
---|---|---|---|
Product: | cnd | Reporter: | Alexey Vladykin <alexey_vladykin> |
Component: | Code Completion | Assignee: | Alexey Vladykin <alexey_vladykin> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Alexey Vladykin
2008-08-19 11:06:47 UTC
One more typename-related issue found in Loki: return associations_.insert( typename IdToProductMap::value_type(id, creator)).second != 0; // value_type is not resolved Without "typename" it resolves correctly. *** Issue 144893 has been marked as a duplicate of this issue. *** Here is a better example (that does compile) iter in for loop is unresolved, while on the next line is ok. template<class K, class V> class normal_iterator { }; template<class K, class V> class AssocVector { public: typedef normal_iterator<K, V> iterator; }; template<class AbstractProduct, typename IdentifierType> class Factory { typedef AssocVector<IdentifierType, AbstractProduct> IdToProductMap; void foo() { for(typename IdToProductMap::iterator iter; ;) { // iter is unresolved } typename IdToProductMap::iterator iter; // ok } }; Fix + test: http://hg.netbeans.org/main/rev/f019f94e85fe Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/f019f94e85fe User: Alexey Vladykin <alexey_vladykin@netbeans.org> Log: Fixed IZ#144363: typename in for-loop leads to unresolved identifier error |