Zig vs D generics

Paulo Pinto pjmlp at progtools.org
Mon Oct 10 08:27:03 UTC 2022


On Monday, 10 October 2022 at 07:30:38 UTC, Kagamin wrote:
>>In contrast, C++ code attempting to call non-constexpr 
>>functions (i.e. functions only accessible at run time) in a 
>>constexpr context (i.e. functions which are available both at 
>>compile time and run time) will give an error at the call site.
>
> Eh? So can C++ support an allocator that works both at compile 
> time and at run time? I use such allocator in my D code so it's 
> ctfeable.

Depends on how much you expect from it, featurewise,

https://www.cppstories.com/2021/constexpr-new-cpp20




More information about the Digitalmars-d mailing list