How does __traits and std.traits differ?

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 24 00:16:41 PDT 2015


Looking at the online documentation, it says:

__traits "are extensions to the language to enable programs, at 
compile time, to get at information internal to the compiler."

std.traits are "Templates which extract information about types 
and symbols at compile time.

Do they both basically do the same thing?  They both have 
isIntegral, but there is a lot of functionality that they don't 
share.

I guess one naive question would be, why not just have all the 
__traits functionality rolled into std.traits?  Or vice versa?




More information about the Digitalmars-d-learn mailing list