Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::allocator<T>::max_size

      From cppreference.com
      <cpp‎ |memory‎ |allocator
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
       
      size_type max_size()constthrow();
      (until C++11)
      size_type max_size()constnoexcept;
      (since C++11)
      (deprecated in C++17)
      (removed in C++20)

      Returns the maximum theoretically possible value ofn, for which the callallocate(n,0) could succeed.

      In most implementations, this returnsstd::numeric_limits<size_type>::max()/ sizeof(value_type).

      [edit]Parameters

      (none)

      [edit]Return value

      The maximum supported allocation size.

      [edit]See also

      [static]
      returns the maximum object size supported by the allocator
      (public static member function ofstd::allocator_traits<Alloc>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/allocator/max_size&oldid=153188"

      [8]ページ先頭

      ©2009-2025 Movatter.jp