Open Search
    IsZeroInitialized< T > Struct Template Reference

    #include <apibase.h>

    Inheritance diagram for IsZeroInitialized< T >:

    Detailed Description

    template<typename T>
    struct maxon::IsZeroInitialized< T >

    This type trait determines if the default constructor of type T initializes the value with a sequence of 0-bytes (or at least if a value initialized with 0-bytes is equivalent to a value initialized by the default constructor). By default, this holds only for scalar types. You can specialize this template for your own types if they are zero-initialized. This helps to save space in the binaries as the DefaultValue function can use a shared block of 0-bytes for all zero-initialized types.

    Template Parameters
    TType to check.