Fixing spurious "statement is not reachable" in template code

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 27 21:51:14 PDT 2015


On Tuesday, 27 October 2015 at 21:55:28 UTC, Timon Gehr wrote:
> On 10/27/2015 10:29 PM, tsbockman wrote:
>> On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote:
>>> On 10/27/2015 09:18 PM, tsbockman wrote:
>>>> I don't think any dead code is being generated,
>>>
>>> This seems to be a misunderstanding. I mean generated using 
>>> mixins or
>>> template instantiation. Sure, it will usually be removed, but 
>>> why
>>> generate and semantically analyze it in the first place.
>>
>> Forcing me to ...
>
> This post is attacking a straw man. I'm not suggesting any of 
> this.

Well then what *are* you suggesting? Can you describe an easy way 
for the user to avoid or suppress this warning without 
introducing redundant logic into their code?


More information about the Digitalmars-d mailing list