| Home | Libraries | People | FAQ | More

###### basic_flat_buffer::basic_flat_buffer (6 of 10 overloads)

Move Constructor.

<h7> Synopsis </h7>

    basic_flat_buffer(
        basic_flat_buffer&& other,
        Allocator const& alloc);

<h7> Description </h7>

Using `alloc` as the allocator for the new container, the contents of `other` are moved. If `alloc != other.get_allocator()`, this results in a copy. The maximum size will be the same as the moved-from object. Buffer sequences previously obtained from `other` using `basic_flat_buffer::data` or `basic_flat_buffer::prepare` become invalid after the move.

<h7> Parameters </h7>

Name | Description
--- | ---
`other` | The object to move from. After the move, the moved-from object will have zero capacity, zero readable bytes, and zero writable bytes.
`alloc` | The allocator to use for the object.

<h7> Exceptions </h7>

Type | Thrown On
--- | ---
`std::length_error` | if `other.size()` exceeds the maximum allocation size of `alloc`.