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 242977

Summary: Viability of specialization parameters is not checked during template resolving
Product: cnd Reporter: petrk
Component: Code CompletionAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 237140    
Bug Blocks:    

Description petrk 2014-03-17 16:29:20 UTC
struct my_iter {
    int foo();
};

struct container {
    typedef my_iter iterator;
};

template< typename T > struct exists { typedef void type; };

template< typename C, typename Enable = void> 
struct extract_iterator {
};

template< typename C > 
struct extract_iterator < C, typename exists<typename C::iterator>::type > {
    typedef typename C::iterator type;
};

int main() {   
    extract_iterator<container>::type var; // type is not resolved
    var.foo(); // foo is not resolved
    return 0;
}