Request for Comment assert(__ctfe)

Steven Schveighoffer schveiguy at gmail.com
Sun Apr 5 14:39:07 UTC 2020


On 4/5/20 10:26 AM, Stefan Koch wrote:
> On Sunday, 5 April 2020 at 14:25:27 UTC, Steven Schveighoffer wrote:
>> On 4/5/20 8:11 AM, Stefan Koch wrote:
>>> What do you guys think?
>>
>> It seems like a good idea, except what you will see is a linker error 
>> if you call it. Which is not very friendly or gives the right impression.
>>
>> Is there a way we can have the compiler give an error when it sees 
>> this during compile-time?
>>
> 
> Yes. that is possible.

I'd be fully on board then.

> 
> However actually it never happens :)

What do you mean it never happens?

I get that code that builds and runs correctly today will build with 
this change. But development is full of writing code that doesn't work, 
running the compiler, and fixing the errors shown. When the error is a 
link error, this will be completely confusing.

-Steve


More information about the Digitalmars-d mailing list