最終更新日時(UTC):
が更新

履歴 編集

function
<memory>

std::allocator::コンストラクタ

allocator() throw();                                    // (1) C++03 まで
allocator() noexcept;                                   // (1) C++11 から C++17 まで
constexpr allocator() noexcept;                         // (1) C++20 から

allocator(const allocator&) throw();                    // (2) C++03 まで
allocator(const allocator&) noexcept;                   // (2) C++11 から C++17 まで
constexpr allocator(const allocator&) noexcept;         // (2) C++20 から

template <class U>
allocator(const allocator<U>&) throw();                 // (3) C++03 まで

template <class U>
allocator(const allocator<U>&) noexcept;                // (3) C++11 から C++17 まで

template <class U>
constexpr allocator(const allocator<U>&) noexcept;      // (3) C++20 から

概要

allocatorオブジェクトを構築する。

例外

投げない。

#include <memory>

int main()
{
  std::allocator<int> alloc;
}

出力

参照