[Issue 1774] New: CTFE rejects nested template expansion
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 8 11:17:47 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1774
Summary: CTFE rejects nested template expansion
Product: D
Version: 2.009
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: sean at f4.ca
This is related to issue #1742. In the code below, calling proc_!(char).fn
explicitly in the global scope works, but calling it explicitly in a template
function fails. I would expect both to work.
template proc_( T )
{
size_t fn( in T[] a, in T b )
{
return 0;
}
}
template proc( T1, T2 )
{
size_t proc( T1 a, T2 b )
{
return proc_!(char).fn( a, b );
}
}
const a = proc_!(char).fn( "abcde", 'c' );
const b = proc( "abcde", 'c' );
void main()
{
}
--
More information about the Digitalmars-d-bugs
mailing list