This patch updates <type_traits> to use builtins wherever possible. This patch should increase performance greatly. When I compiled all the type traits tests before and after, I saw a 6.6% decrease in build time.
There are a few traits who's corresponding builtins do not work properly. See the comments in code. We will have to enable these traits only after a particular version of clang where the issue has been fixed.
Nice idea. Is this conforming? Consider this somewhat-contrived example:
With a class template is_same, g() calls the version of f corresponding to the "right" option, but with the alias template version, instantiating A<T> is ill-formed because multiple signatures of f collide.