CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
src
include
base
macros.h
Go to the documentation of this file.
1
// -*- C++ -*-
15
#ifndef __cxz_macros_h__
16
#define __cxz_macros_h__
17
18
#include <iostream>
19
20
#ifndef CHECK
21
#define CHECK std::cout << __FILE__ << ": @" << __LINE__ << " in " << __func__ << std::endl;
22
#endif
23
#ifndef VCHECK
24
#define VCHECK(a) std::cout << __FILE__ << ": @" << __LINE__ \
25
<< " in " << __func__ << ": " << #a << " = " << a << std::endl;
26
#endif
27
29
#define DEFAULT_C(__class_name__) __class_name__() = default
30
32
#define DEFAULT_COPY_C(__class_name__) __class_name__(const __class_name__& a) = default
33
35
#define DEFAULT_COPY_A(__class_name__) __class_name__& operator=(const __class_name__& a) = default
36
38
#define DEFAULT_MOVE_C(__class_name__) __class_name__(__class_name__&& a) = default
39
41
#define DEFAULT_MOVE_A(__class_name__) __class_name__& operator=(__class_name__&& a) = default
42
44
#define DEFAULT_COPY(__class_name__) DEFAULT_COPY_C(__class_name__); DEFAULT_COPY_A(__class_name__)
45
47
#define DEFAULT_MOVE(__class_name__) DEFAULT_MOVE_C(__class_name__); DEFAULT_MOVE_A(__class_name__)
48
50
#define DEFAULT_MEMBERS_X(__class_name__) DEFAULT_COPY(__class_name__); DEFAULT_MOVE(__class_name__)
51
53
#define DEFAULT_MEMBERS(__class_name__) DEFAULT_C(__class_name__); DEFAULT_MEMBERS_X(__class_name__)
54
59
#define SP_DEFAULT_C(__spec__,__class_name__) __spec__ __class_name__() = default
60
65
#define SP_DEFAULT_COPY_C(__spec__,__class_name__) __spec__ __class_name__(const __class_name__& a) = default
66
71
#define SP_DEFAULT_COPY_A(__spec__,__class_name__) __spec__ __class_name__& operator=(const __class_name__& a) = default
72
77
#define SP_DEFAULT_MOVE_C(__spec__,__class_name__) __spec__ __class_name__(__class_name__&& a) = default
78
83
#define SP_DEFAULT_MOVE_A(__spec__,__class_name__) __spec__ __class_name__& operator=(__class_name__&& a) = default
84
89
#define SP_DEFAULT_COPY(__spec__,__class_name__) SP_DEFAULT_COPY_C(__spec__,__class_name__); SP_DEFAULT_COPY_A(__spec__,__class_name__)
90
95
#define SP_DEFAULT_MOVE(__spec__,__class_name__) SP_DEFAULT_MOVE_C(__spec__,__class_name__); SP_DEFAULT_MOVE_A(__spec__,__class_name__)
96
101
#define SP_DEFAULT_MEMBERS_X(__spec__,__class_name__) SP_DEFAULT_COPY(__spec__,__class_name__); SP_DEFAULT_MOVE(__spec__,__class_name__)
102
107
#define SP_DEFAULT_MEMBERS(__spec__,__class_name__) SP_DEFAULT_C(__spec__,__class_name__); SP_DEFAULT_MEMBERS_X(__spec__,__class_name__)
108
112
#define INDEX_RANDOM_ACCESS_ITERATOR_DEFS(__meta_type__) typedef std::random_access_iterator_tag iterator_category; \
113
typedef SizeT difference_type; \
114
typedef __meta_type__ value_type; \
115
typedef const __meta_type__* pointer; \
116
typedef const __meta_type__& reference
117
118
#define CXZ_CVAL_FALSE static constexpr bool value = false
119
#define CXZ_CVAL_TRUE static constexpr bool value = true
120
121
#define IS_SAME(a,b) std::is_same<a,b>::value
122
#define IS_NOT_SAME(a,b) (not std::is_same<a,b>::value)
123
124
#ifdef HAVE_CEREAL
125
#define SERIALIZATION_FUNCTIONS template <class Archive> void save(Archive& ar, const std::uint32_t version) const; \
126
template <class Archive> void load(Archive& ar, const std::uint32_t version)
127
#define SERIALIZATION_FUNCTIONS_NOPUB friend class cereal::access; \
128
template <class Archive> void save(Archive& ar, const std::uint32_t version) const; \
129
template <class Archive> void load(Archive& ar, const std::uint32_t version)
130
#else
131
#define SERIALIZATION_FUNCTIONS static const int v = 0
132
#define SERIALIZATION_FUNCTIONS_NOPUB static const int v = 0
133
#endif
134
135
#endif
Generated by
1.10.0