IsValueType template? std.traits.hasAliasing?

Bill Baxter wbaxter at gmail.com
Tue Jan 27 18:31:14 PST 2009


On Wed, Jan 28, 2009 at 11:26 AM, bearophile <bearophileHUGS at lycos.com> wrote:
> Bill Baxter Wrote:
>> Does anyone have a good template for checking if a struct is
>> semantically a pure value type or not?
>
> I think IsReferenceType in the templates module of my dlibs may be fit:
> http://www.fantascienza.net/leonardo/so/dlibs/templates.html
> Code:
> http://www.fantascienza.net/leonardo/so/libs_d.zip
> (Works with D1, Phobos).
>

Yep -- dimscha's function is annotated "// thanks bearophile".  So I
think it's probably the same thing.

Thanks to both of you.  :-)

--bb



More information about the Digitalmars-d mailing list