[Issue 11389] New: template arity does not work with function type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 30 13:58:56 PDT 2013
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 at puremagic.com
ReportedBy: maidenphil at hotmail.com
--- Comment #0 from Phil Lavoie <maidenphil at 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: -------
More information about the Digitalmars-d-bugs
mailing list