次の方法で共有


scoped_allocator_adaptor::allocate メソッド

Outer のアロケーターを使用してメモリを割り当てます。

pointer allocate(size_type count);
pointer allocate(size_type count, const_void_pointer hint);

パラメーター

  • count
    十分な記憶領域が割り当てられている要素の数。

  • hint
    オブジェクトのアドレスを検索することによってオブジェクトのアロケーター役立つポインターは要求前に代入します。

戻り値

一つ目のメンバー関数は Outer_traits::allocate(outer_allocator(), count)を返します。2 番目のメンバー関数は Outer_traits::allocate(outer_allocator(), count, hint)を返します。

必要条件

ヘッダー: <scoped_allocator>

名前空間: std

参照

関連項目

scoped_allocator_adaptor クラス

allocator_traits::allocate メソッド