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