Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::alloca...ts::max_size(3) C++ Standard Libarystd::alloca...ts::max_size(3)

NAME
       std::allocator_traits::max_size - std::allocator_traits::max_size

Synopsis
	  Defined in header <memory>
	  static    size_type	max_size(   const   Alloc&   a	 )   noexcept;
       (since C++11)
									   (un-
       til C++20)
	  static constexpr size_type max_size(	const  Alloc&  a  )  noexcept;
       (since C++20)

	  If  possible,	 obtains the maximum theoretically possible allocation
       size from the
	  allocator a, by calling a.max_size().

	  If the above is not possible (e.g. Alloc does	not  have  the	member
       function
	  max_size()), then returns std::numeric_limits<size_type>::max() /
	  sizeof(value_type).

Parameters
	  a - allocator	to detect

Return value
	  Theoretical maximum allocation size.

	 Defect	reports

	  The following	behavior-changing defect reports were applied retroac-
       tively to
	  previously published C++ standards.

	     DR	       Applied	  to		   Behavior    as    published
       Correct behavior
	  LWG 2162 C++11      max_size was not requied to be noexcept	   re-
       quired
	  LWG 2466 C++11      theoretical maximum  allocation  size  in	 bytes
       size in elements	is
			      was returned as fallback			   re-
       turned

See also
	  max_size	returns	the largest supported allocation size
	  (until C++20)	(public	member function	of std::allocator<T>)

http://cppreference.com		  2022.07.31	 std::alloca...ts::max_size(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::allocator_traits::max_size&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help