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.

Bug 257030 - Unresolved identifiers in template if variable has 'auto' type
Summary: Unresolved identifiers in template if variable has 'auto' type
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-07 19:32 UTC by soldatov
Modified: 2016-07-20 01:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2015-12-07 19:32:53 UTC
NetBeans 8.1, Ubuntu 15.10, G++ 5.2.1, --std=c++11

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

struct S {
    int v;

    S(int v) : v(v) {
    }

    int getV() {
        return v;
    }
};

template <typename T>
void print(const T& values) {
    for (const auto& value : values) {
        cout << value->getV() << endl; // unresolved identifier 'getV'
    }
}

int main() {
    vector<S*> v;
    v.push_back(new S(1));
    v.push_back(new S(2));
    v.push_back(new S(3));
    print(v);
}
Comment 1 petrk 2016-07-19 11:04:58 UTC
299273:1e2eaadd040a
Comment 2 Quality Engineering 2016-07-20 01:51:28 UTC
Integrated into 'main-silver', will be available in build *201607200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1e2eaadd040a
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #257030 - Unresolved identifiers in template if variable has 'auto' type