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 247569 - Unresolved id after static_cast in template specialization
Summary: Unresolved id after static_cast in template specialization
Status: NEW
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: 2014-09-29 16:08 UTC by Vladimir Kvashin
Modified: 2014-11-20 11:49 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 Vladimir Kvashin 2014-09-29 16:08:48 UTC
In the following code (original is taken from cafe),
static_cast<my_class*>(p)->foo_1 is unresolved;
but on the next line reference to foo_1 is resolved OK

#define NULL 0

template<int> class my_class {};

template<> class my_class<1> {
public:
    void foo_1(void* p) {
        static_cast<my_class*>(p)->foo_1(NULL); // foo_1() is unresolved
        my_class* p2 = static_cast<my_class*>(p);
        p2->foo_1(NULL); // resolved ok
    }
};

template<> class my_class<2> {
public:
    void foo_2(void* p) {
        static_cast<my_class*>(p)->foo_2(NULL); // foo_2() is unresolved
        my_class* p2 = static_cast<my_class*>(p);
        p2->foo_2(NULL); // resolved ok
    }
};