Documentation of CSL
default_move_cpy.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
23 #ifndef CSL_DEFAULT_MV_CPY_H_INCLUDED
24 #define CSL_DEFAULT_MV_CPY_H_INCLUDED
25 
26 #define DEFINE_DEFAULT_CPY_CONSTRUCTOR(className)\
27  className(className const&) = default;
28 #define DEFINE_DEFAULT_MV_CONSTRUCTOR(className)\
29  className(className &&) = default;
30 #define DEFINE_DEFAULT_MC_CONSTRUCTOR(className)\
31  DEFINE_DEFAULT_CPY_CONSTRUCTOR(className)\
32  DEFINE_DEFAULT_MV_CONSTRUCTOR(className)
33 
34 #define DEFINE_DEFAULT_CPY_ASSIGNEMENT(className)\
35  className& operator=(className const&) = default;
36 #define DEFINE_DEFAULT_MV_ASSIGNEMENT(className)\
37  className& operator=(className &&) = default;
38 #define DEFINE_DEFAULT_MC_ASSIGNEMENT(className)\
39  DEFINE_DEFAULT_CPY_ASSIGNEMENT(className)\
40  DEFINE_DEFAULT_MV_ASSIGNEMENT(className)
41 
42 #define DEFINE_DEFAULT_CPY(className)\
43  DEFINE_DEFAULT_CPY_CONSTRUCTOR(className)\
44  DEFINE_DEFAULT_CPY_ASSIGNEMENT(className)
45 
46 #define DEFINE_DEFAULT_MV(className)\
47  DEFINE_DEFAULT_MV_CONSTRUCTOR(className)\
48  DEFINE_DEFAULT_MV_ASSIGNEMENT(className)
49 
50 #define DEFINE_DEFAULT_CPY_MV(className)\
51  DEFINE_DEFAULT_CPY(className)\
52  DEFINE_DEFAULT_MV(className)
53 
54 
55 #endif