MySQL 8.0.32
Source Code Documentation
ut0class_life_cycle.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2020, 2022, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is also distributed with certain software (including but not
10limited to OpenSSL) that is licensed under separate terms, as designated in a
11particular file or component or in included license documentation. The authors
12of MySQL hereby grant you an additional permission to link the program and
13your derivative works with the separately licensed software that they have
14included with MySQL.
15
16This program is distributed in the hope that it will be useful, but WITHOUT
17ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
19for more details.
20
21You should have received a copy of the GNU General Public License along with
22this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25*****************************************************************************/
26
27/** @file include/ut0class_life_cycle.h
28Utilities related to class lifecycle. */
29
30#ifndef ut0class_life_cycle_h
31#define ut0class_life_cycle_h
32
33namespace ut {
34
35/**
36A utility class which, if inherited from, prevents the descendant class
37from being copied, moved, or assigned.
38This is useful for guard classes.
39*/
41 public:
42 Non_copyable(const Non_copyable &) = delete;
44
45 protected:
46 Non_copyable() = default;
47 ~Non_copyable() = default; /// Protected non-virtual destructor
48};
49
50} /* namespace ut */
51
52#endif /* ut0class_life_cycle_h */
A utility class which, if inherited from, prevents the descendant class from being copied,...
Definition: ut0class_life_cycle.h:40
Non_copyable(const Non_copyable &)=delete
~Non_copyable()=default
Non_copyable & operator=(const Non_copyable &)=delete
Non_copyable()=default
This file contains a set of libraries providing overloads for regular dynamic allocation routines whi...
Definition: aligned_alloc.h:47