View source code
							
							
						
								Display the source code in std/experimental/allocator/package.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Function std.experimental.allocator.allocatorObject
Returns a dynamically-typed CAllocator built around a given statically-
typed allocator a of type A. Passing a pointer to the allocator
creates a dynamic allocator around the allocator pointed to by the pointer,
without attempting to copy or move it. Passing the allocator by value or
reference behaves as follows.
						
				RCIAllocator allocatorObject(A)
				(
				
				  auto ref A a
				
				)
				
				if (!isPointer!A);
				
				
				RCIAllocator allocatorObject(A)
				(
				
				  A* pa
				
				);
						
					
				- If Ahas no state, the resulting object is allocated in static shared storage.
- If Ahas state, the result willmovethe supplied allocatorA awithin. The result itself is allocated in its own statically-typed allocator.
Example
import stdAuthors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.