October 30, 2013 [Issue 11389] New: template arity does not work with function type | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=11389 Summary: template arity does not work with function type Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: maidenphil@hotmail.com --- Comment #0 from Phil Lavoie <maidenphil@hotmail.com> 2013-10-30 13:58:56 PDT --- This program crashes unexpectedly: import std.stdio; import std.traits; void main( string[] args ) { alias TheType = size_t function( string[] ); static assert( isCallable!TheType ); static assert( variadicFunctionStyle!TheType == Variadic.no ); //Should meet the requirements now. static assert( arity!TheType == 1 ); //Crashes here. } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation