copy_on_write<T> |
Defined in
<copy_on_write.hpp> |
A copy-on-write wrapper for any type that models RegularType
Types
Type | Definition | Notes |
---|---|---|
T |
The type of value stored |
|
T |
The type of value stored [[deprecated]] |
Member Fields
Field | Type | Notes |
---|---|---|
default_s | stlab::copy_on_write::model |
Shared, empty model instance |
Copy-on-write semantics allow for an object to be lazily copied - only creating a copy when 1) the value is modified, and 2) there is more than one reference to the value.
copy_on_write
is thread safe, and supports types that model MoveableType
.