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

FreeBSD Manual Pages

  
 
  

home | help
std::pmr::p...c_allocator(3)  C++ Standard Libary std::pmr::p...c_allocator(3)

NAME
       std::pmr::polymorphic_allocator::polymorphic_allocator		     -
       std::pmr::polymorphic_allocator::polymorphic_allocator

Synopsis
	  polymorphic_allocator()				     noexcept;
       (1)
	  polymorphic_allocator(  const	 polymorphic_allocator&	 other ) = de-
       fault;	(2)
	  template<		    class		  U		     >
       (3)
	  polymorphic_allocator( const polymorphic_allocator<U>& other ) noex-
       cept;
	  polymorphic_allocator(      std::pmr::memory_resource*      r	    );
       (4)

	  Constructs a new polymorphic_allocator.

	  1) Constructs	a polymorphic_allocator	using the return value of
	  std::pmr::get_default_resource() as the underlying memory resource.
	  2-3) Constructs a polymorphic_allocator  using  other.resource()  as
       the underlying
	  memory resource.
	  4) Constructs	a polymorphic_allocator	using r	as the underlying mem-
       ory resource.
	  This constructor provides an implicit	conversion from	std::pmr::mem-
       ory_resource*.

Parameters
	  other	- another polymorphic_allocator	to copy	from
	  r	- pointer to the memory	resource to use. May not be null.

Exceptions
	  4) Throws nothing.

Notes
	  Copying  a container using a polymorphic_allocator will not call the
       allocator's copy
	  constructor. Instead,	the new	container will use the return value of
	  select_on_container_copy_construction	(a  default-constructed	 poly-
       morphic_allocator)
	  as its allocator.

See also
						Create a new polymorphic_allo-
       cator for use by
	  select_on_container_copy_construction	a container's copy constructor
						(public	member function)

http://cppreference.com		  2022.07.31	  std::pmr::p...c_allocator(3)

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

home | help