Attribute inference for auto functions?

Jesse Phillips Jessekphillips+D at gmail.com
Wed Apr 17 14:21:04 PDT 2013


On Wednesday, 17 April 2013 at 07:04:16 UTC, Peter Alexander 
wrote:
> Often enough. I often find myself returning ranges, which are 
> almost invariably complex template types.

Hmm, I'm still trying to decide if this is a major concern.

Generally when returning a range, this is done because operations 
are being performed on a container, the specific container isn't 
important and many times nor is the type in the container. This 
means my function is a template.

The times when I could see returning a complex type where the 
function isn't templates is when I'm loading the data to be 
consumed. In this case I generally will return the container 
itself (since ownership isn't with the called function).


More information about the Digitalmars-d mailing list