2017-02-16 11:20:40 +01:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
2021-07-28 20:59:31 +02:00
|
|
|
#ifndef __cxz_base_def_h__
|
|
|
|
#define __cxz_base_def_h__
|
2017-02-16 11:20:40 +01:00
|
|
|
|
2017-02-22 13:34:32 +01:00
|
|
|
#include <cassert>
|
|
|
|
|
2017-02-21 21:47:40 +01:00
|
|
|
#define DEBUG_MODE_X
|
2017-02-21 17:41:48 +01:00
|
|
|
|
|
|
|
#ifdef DEBUG_MODE_X
|
|
|
|
|
|
|
|
#include <iostream>
|
2018-07-17 13:56:59 +02:00
|
|
|
#ifndef CHECK
|
2017-02-21 17:41:48 +01:00
|
|
|
#define CHECK std::cout << __FILE__ << ": @" << __LINE__ << " in " << __func__ << std::endl;
|
2018-07-17 13:56:59 +02:00
|
|
|
#endif
|
|
|
|
#ifndef VCHECK
|
2017-02-21 17:41:48 +01:00
|
|
|
#define VCHECK(a) std::cout << __FILE__ << ": @" << __LINE__ \
|
|
|
|
<< " in " << __func__ << ": " << #a << " = " << a << std::endl;
|
2018-07-17 13:56:59 +02:00
|
|
|
#endif
|
2017-02-21 17:41:48 +01:00
|
|
|
|
|
|
|
#else
|
|
|
|
#define CHECK
|
|
|
|
#define VCHECK(a)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2022-09-03 22:11:36 +02:00
|
|
|
#define DEFAULT_C(__class_name__) __class_name__() = default
|
|
|
|
#define DEFAULT_COPY_C(__class_name__) __class_name__(const __class_name__& a) = default
|
|
|
|
#define DEFAULT_COPY_A(__class_name__) __class_name__& operator=(const __class_name__& a) = default
|
|
|
|
#define DEFAULT_MOVE_C(__class_name__) __class_name__(__class_name__&& a) = default
|
|
|
|
#define DEFAULT_MOVE_A(__class_name__) __class_name__& operator=(__class_name__&& a) = default
|
|
|
|
#define DEFAULT_COPY(__class_name__) DEFAULT_COPY_C(__class_name__); DEFAULT_COPY_A(__class_name__)
|
|
|
|
#define DEFAULT_MOVE(__class_name__) DEFAULT_MOVE_C(__class_name__); DEFAULT_MOVE_A(__class_name__)
|
|
|
|
|
|
|
|
#define DEFAULT_MEMBERS_X(__class_name__) DEFAULT_COPY(__class_name__); DEFAULT_MOVE(__class_name__)
|
|
|
|
#define DEFAULT_MEMBERS(__class_name__) DEFAULT_C(__class_name__); DEFAULT_MEMBERS_X(__class_name__)
|
2017-03-28 17:55:12 +02:00
|
|
|
|
2017-02-16 11:20:40 +01:00
|
|
|
#endif
|