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 244833

Summary: bug in template function parameter
Product: cnd Reporter: Yankes
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:

Description Yankes 2014-06-01 12:51:27 UTC
--->%--->%--->%---

template<void (*P)()> //error: unable to resolve identifier P
class B
{

};

--->%--->%--->%---
Comment 1 Yankes 2016-08-06 16:33:36 UTC
Small bump, in Dev 201608060002 it still do not work.
Comment 2 soldatov 2016-11-10 15:14:58 UTC
Same bug in this case:

int func() {
    return 1;
}

template<class T, int (*pVal)() = func>
T myTempFunc(T t) {
    return t + pVal();
}

int main() {
    myTempFunc<int, &func>(2);
    return 0;
}