Introduce noncopyable_t and nonmovable_t

These are little helper types that allow us to get rid of lots of
'=delete' declarations.
This commit is contained in:
ridiculousfish
2021-07-22 10:43:25 -07:00
parent e9ff3f2e65
commit 5f7e03ccf4
24 changed files with 72 additions and 209 deletions

View File

@@ -547,7 +547,7 @@ class env_node_t {
} // namespace
using env_node_ref_t = std::shared_ptr<env_node_t>;
class env_scoped_impl_t : public environment_t {
class env_scoped_impl_t : public environment_t, noncopyable_t {
/// A struct wrapping up parser-local variables. These are conceptually variables that differ in
/// different fish internal processes.
struct perproc_data_t {
@@ -573,11 +573,6 @@ class env_scoped_impl_t : public environment_t {
std::shared_ptr<owning_null_terminated_array_t> export_array();
env_scoped_impl_t(env_scoped_impl_t &&) = delete;
env_scoped_impl_t(const env_scoped_impl_t &) = delete;
void operator=(env_scoped_impl_t &&) = delete;
void operator=(const env_scoped_impl_t &) = delete;
protected:
// A linked list of scopes.
env_node_ref_t locals_{};