SGI-STL abbreviated (c) - configuration, type of characteristics extraction, resolved uninitialized

stl_construct.h: 
    offers a variety of constructors, destruction template function; 
    builder construct construction and provide value to the default configuration mode, _Construct by calling overloaded functions; 
    a destructor destroy it provides a way to destroy pointers and iterators , by calling _destroy overloaded functions; 
    _Construct: by "placing" new new , configured to achieve; 
    _destroy: template type object by calling the destructor for an iterator manner, through __destroy (by internal __destroy_aux) traversing destruction, due to built-in data type does not require destruction, 
    it is necessary to determine whether the internal built-in type, the type of the corresponding destructor to the non-built-in type call, or not treated; 
    __destroy_aux: template class overloaded, or by __false_type __true_type determine whether the object is implicitly destroyed; 
    furthermore _Destroy built by common types of indicators can be used as an iterator, it is also overloaded respective basic types of treatment (no treatment); 

type_traits.h: 
    type of extraction, properties ; 
    two special types __true_type, __ false_type, as some general reference template Identified identification, such as the above __destroy_aux; 
    __type_traits: type attribute extraction template class, wherein has_trivial_default_constructor, has_trivial_copy_constructor, has_trivial_assignment_operator,
    has_trivial_destructor, is_POD_type represent implicit default constructor, copy constructor, assignment operation and destructor implicitly, whether the original built-in type, are __false_type default case;
    Other __type_traits specializations are built-in types (such as: int , BOOL , float , ..., char * , etc.) are __true_type, 
    _Is_integer: template functions, whether integer (or can be converted to integer type (eg: int , unsigned char , Short , Long  Long ...)), where the default is __false_type _Integral in other cases; 
    when the integer type as a __true_type; 
    
    in addition to the respective components are substantially re-used type of statement: 
        typedef size_t size_type; 
        typedef ptrdiff_t difference_type; 
        typedef _TP *        pointer; 
        typedef const _TP * const_pointer; 
        typedef _TP &        Reference; 
        typedef const _TP & const_reference; 
        typedef _TP the value_type; 
        
stl_uninitialized.h: 
    initialization fill, copy: 
    uninitialized_copy: overloaded version 3 is currently available, wherein each of the two char *, * wchar_t data type directly memmove memory copy call, to provide another iterator copy range, by 
    __uninitialized_copy process, and calls the internal __uninitialized_copy_aux before obtaining results to content type of the iterator pointer again; __ internal uninitialized_copy_aux extracted by 
    content type is a pointer is_POD_type, to achieve process different the content, if it is inside the original POD can directly call the copy, or traversing the iterator and call _Construct structure respectively, if the failure 
    thrown exception object before _Destroy destructor is called has been successfully constructed, in addition based on different iterator there are different iteration strategy; 
    uninitialized_copy_n: with uninitialized_copy, provide a copy of the number of parameters;
    uninitialized_fill, uninitialized_fill_n: Type in the uninitialized_copy uninitialized_copy_n; primitive type POD filling through fill, traversing the iteration or call _Construct configuration, 
    if an exception is thrown failed before the object has been successfully configured _Destroy destructor is invoked, different from an iterator in addition, there are different iteration strategy;
    

 

Guess you like

Origin www.cnblogs.com/haomiao/p/11647208.html