diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-11-17 19:58:41 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-11-17 20:08:20 -0500 |
| commit | b9b02276ebd81b0579784c97006ce9d9cc18fb06 (patch) | |
| tree | 9be666d43f15154ee3df2001ced3972cc31a99d7 /src/common/page_table.h | |
| parent | 60b72b1debde587546f6f0b03bcef19c185cb091 (diff) | |
page_table: Allow page tables to be moved
Makes page tables and virtual buffers able to be moved, but not copied,
making the interface more flexible.
Previously, with the destructor specified, but no move assignment or
constructor specified, they wouldn't be implicitly generated.
Diffstat (limited to 'src/common/page_table.h')
| -rw-r--r-- | src/common/page_table.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/page_table.h b/src/common/page_table.h index a5be7a668a..9754fabf91 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -4,6 +4,8 @@ #pragma once +#include <tuple> + #include "common/common_types.h" #include "common/memory_hook.h" #include "common/virtual_buffer.h" @@ -47,7 +49,13 @@ struct SpecialRegion { */ struct PageTable { PageTable(); - ~PageTable(); + ~PageTable() noexcept; + + PageTable(const PageTable&) = delete; + PageTable& operator=(const PageTable&) = delete; + + PageTable(PageTable&&) noexcept = default; + PageTable& operator=(PageTable&&) noexcept = default; /** * Resizes the page table to be able to accomodate enough pages within |
