Metaprogramming: check for ref

mist none at none.none
Wed Oct 3 15:08:22 PDT 2012


On Sunday, 30 September 2012 at 21:34:36 UTC, Andrej Mitrovic 
wrote:
> On 9/30/12, jerro <a at a.com> wrote:
>> I think this should work:
>>
>> template returnsRef(alias f)
>> {
>>      enum bool returnsRef = is(typeof(
>>      {
>>          ParameterTypeTuple!f param;
>>          auto ptr = &f(param);
>>      }));
>> }
>
> Yep. We should add this to Phobos imo.

Was pull request fired for this? I'd like to subscribe to get 
noticed when this will be in the phobos. If not, would you mind 
if I add one?


More information about the Digitalmars-d-learn mailing list