Should formattedWrite take the outputrange by ref?

monarch_dodra monarchdodra at gmail.com
Sun Jan 19 08:02:31 PST 2014


On Sunday, 19 January 2014 at 15:28:04 UTC, Tobias Pankrath wrote:
> On Sunday, 19 January 2014 at 15:12:07 UTC, Tobias Pankrath 
> wrote:
>> On Sunday, 19 January 2014 at 15:03:13 UTC, monarch_dodra 
>> wrote:
>>
>>> So, my conclusion, "*" might be a workable solution. But 
>>> simply taking by ref would be cleaner, and make more sense as 
>>> a whole.
>>
>> Or a special template constraint path for T*.
>>
>> foo(T)(T t) if (is(T = Q*)) && manyOtherChecks!(Q)
>> foo(T)(T t) if (!is(T = Q*)) && manyOtherChecks!(T)
>>
>> Maybe that will break less code.
>
> But maybe we really should go for taking the output range by 
> reference. See 
> https://d.puremagic.com/issues/show_bug.cgi?id=10291
> https://d.puremagic.com/issues/show_bug.cgi?id=9102
>
> Created a new report for this: 
> https://d.puremagic.com/issues/show_bug.cgi?id=11951

Thanks! I'll look into these.


More information about the Digitalmars-d-learn mailing list