Implementation Notes

  1. The circumstances under which these type traits yield a result of "true" is not specified in TR1:
    • is_empty
    • is_pod
    • has_trivial_constructor
    • has_trivial_copy
    • has_trivial_assign
    • has_trivial_destructor
    • has_nothrow_destructor
    • has_nothrow_copy
    • has_nothrow_assign

    With XL C++, these traits behave as specified in the following section.

  2. TR1 grants to implementors of the type traits library the latitude to implement certain type traits as class templates with no static or non-static data or function members, no base classes, and no nested types. For example, the following implementations of the type traits is_class and is_union are permissible for implementations that cannot distinguish between class and union types:
    template <typename T> struct is_class{};
    template <typename T> struct is_union{};
    The type traits for which this latitude is granted are:
    • is_class
    • is_union
    • is_polymorphic
    • is_abstract

    XL C++ does not take advantage of this latitude. Full implementations of these type traits are provided

  3. TR1 grants to implementors of the type traits library the latitude to implement the type trait has_virtual_destructor in such a way that its static data member always has a value of true, regardless of the type argument to which it is applied. XL C++ does not take advantage of this latitude. The expression has_virtual_destructor<T>::value will have a value of true if and only if the type argument T is a class type with a virtual destructor.