[cfe-dev] intrinsics documentation?

Howard Hinnant hhinnant at apple.com
Thu Oct 7 11:43:24 PDT 2010


On Oct 7, 2010, at 2:26 PM, Chris Lattner wrote:

> 
> On Oct 7, 2010, at 11:21 AM, Howard Hinnant wrote:
> 
>> Is there some place I can browse clang's implemented intrinsics and their precise syntax and semantics?
>> 
>> I'm currently trying to make sure the libc++ <type_traits> takes advantage of everything it can, such as the newly implemented __is_convertible_to and __is_base_of.
> 
> These should be (but aren't) all documented in LanguageExtensions.html
> 
> -Chris

Here's a list of intrinsics that I wish were documented but aren't.  I'd document them myself, but it would be too easy for me to make incorrect assumptions about corner cases.

__is_union
__is_class
__is_enum
__has_trivial_constructor
__has_nothrow_constructor
__has_trivial_copy
__has_nothrow_copy
__has_trivial_assign
__has_nothrow_assign
__has_trivial_destructor
__has_virtual_destructor
__is_pod
__is_convertible_to
__is_base_of

And perhaps I've missed some, I'm not sure.  For example I'd love to also see:

__underlying_type
__is_trivial
__is_trivially_copyable
__is_standard_layout
__is_literal_type
__is_nothrow_constructible
__is_trivially_constructible
__is_nothrow_assignable
__is_trivially_assignable
__is_destructible
__is_nothrow_destructible
__is_trivally_destructible

On a closely related note (and just fyi), the following paper is being prepared for the next meeting involving the constructor/assignment traits.  This is still an early draft, though the proposed wording section is relatively mature:

http://home.roadrunner.com/~hinnant/traits.html

-Howard





More information about the cfe-dev mailing list