D-Programming-Language/phobos — pull request #2178 by monarchdodra (2014-05-17 20:59:02+00:00)
Title: Sanitize Appender constraints a bit.

This rewrites the template definition of `Appender` to use the `isDynamicArray` constraint: This avoids ridiculous declarations of `Appender!A` where A is *convertible* to a dynamic array, but not an *actual* dynamic array (think `alias this` and static array). AFAIK, this should break nothing, since the constraints should usually be explicit and correct.

I did not change `appender`'s restraint itself, since it worked anyways, as it explicitly created an `Appender!(E[])` anyways, and didn't want to break working code for no reason.

The bug I initially wanted to fix was related was (yet again) a "static array" => "dynamic array" implicit conversion error. Basically, static arrays were passed *by value* to `appender`, and then `appender` created an actual `Appender` by slicing that *local* static array. This left the appender referencing locally scoped and later destroyed data...

@schveiguy : You've been diligent at reviewing my appender fixes, give this a whirl?