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

FreeBSD Manual Pages

  
 
  

home | help
std::uses_allocator(3)	      C++ Standard Libary	std::uses_allocator(3)

NAME
       std::uses_allocator - std::uses_allocator

Synopsis
	  Defined in header <functional>
	  template<    class	R,    class...	 ArgTypes,   class   Alloc   >
       (since C++11)
	  struct   uses_allocator<std::function<R(ArgTypes...)>,   Alloc>    :
       (until C++17)
	  std::true_type { };

	  This	specialization	of  std::uses_allocator	 informs other library
       components that all
	  objects of type std::function	support	 uses-allocator	 construction,
       even though they
	  do not have a	nested allocator_type.

Notes
	  std::function's allocator support was	poorly specified and inconsis-
       tently
	  implemented. Some implementations do not support uses-allocator con-
       struction at all,
	  some	provide	 the  needed constructor overloads but ignore the sup-
       plied allocator
	  argument, and	some provide the overloads and use the supplied	 allo-
       cator for
	  construction	but not	when the std::function is reassigned. As a re-
       sult, allocator
	  support was removed in C++17.

       Inherited from std::integral_constant

Member constants
	  value	   true
	  [static] (public static member constant)

Member functions
	  operator bool	converts the object to bool, returns value
			(public	member function)
	  operator()	returns	value
	  (C++14)	(public	member function)

Member types
	  Type	     Definition
	  value_type bool
	  type	     std::integral_constant<bool, value>

See also
	  uses_allocator checks	if the specified type supports	uses-allocator
       construction
	  (C++11)	 (class	template)

http://cppreference.com		  2022.07.31		std::uses_allocator(3)

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

home | help