jeudi 24 décembre 2020

Unlike STL and std::basic_string, there is no default allocator for std::function

Unlike STL and std::basic_string, there is no default allocator for std::function. Why?

    template< class Alloc >
    function( std::allocator_arg_t, const Alloc& alloc,
                  std::nullptr_t ) noexcept;
    
    template<
        class CharT,
        class Traits = std::char_traits<CharT>,
        class Allocator = std::allocator<CharT>
    > class basic_string;
    
    template<class T,
    class Allocator = std::allocator<T>
   > class vector;

Aucun commentaire:

Enregistrer un commentaire