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 - bug in template function parameter
Summary: bug in template function parameter
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-01 12:51 UTC by Yankes
Modified: 2016-11-10 15:14 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 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;
}