_aApply.../opApply() return type: int or size_t?

David Nadlinger see at klickverbot.at
Fri Apr 29 17:02:39 PDT 2011


[repost from dmd-internals]

What should the _aApply... runtime functions, or in general, opApply() 
return? According to the current runtime implementation and 
http://www.digitalmars.com/d/2.0/statement.html, the return type should 
be int, but DMD expects Type::tindex (i.e. size_t) in 
ForeachStatement::semantic().

This is relevant to LDC, where the type is reflected in the backend 
(well, LLVM IR).

David


More information about the Digitalmars-d mailing list