POD

Walter Bright newshound2 at digitalmars.com
Sat Dec 29 13:20:20 PST 2012


On 12/29/2012 4:38 AM, Jacob Carlborg wrote:
> On 2012-12-29 00:53, Andrej Mitrovic wrote:
>
>> I suggest we implement a compiler trait via __traits(isPOD, Type).
>> C++11 has is_pod, D should have a Phobos template that wraps around
>> the new trait.
>
> Do we need a new trait, can't this be done in pure D?

Yes for a new trait, for the reasons:

1. POD status is affected by a number of characteristics. This would all have to 
be rather carefully done to ensure an exact match with the compiler.

2. There are many discussions here about changing the definition of POD. The 
likelihood of changing the compiler, and then neglecting to change the Phobos 
version or not updating the Phobos version correctly is high.



More information about the Digitalmars-d mailing list