cnorxz/orig/include/base_def.h

39 lines
1.3 KiB
C
Raw Normal View History

2017-02-16 11:20:40 +01:00
// -*- C++ -*-
#ifndef __cxz_base_def_h__
#define __cxz_base_def_h__
2017-02-16 11:20:40 +01:00
#include <cassert>
#define DEBUG_MODE_X
2017-02-21 17:41:48 +01:00
#ifdef DEBUG_MODE_X
#include <iostream>
#ifndef CHECK
2017-02-21 17:41:48 +01:00
#define CHECK std::cout << __FILE__ << ": @" << __LINE__ << " in " << __func__ << std::endl;
#endif
#ifndef VCHECK
2017-02-21 17:41:48 +01:00
#define VCHECK(a) std::cout << __FILE__ << ": @" << __LINE__ \
<< " in " << __func__ << ": " << #a << " = " << a << std::endl;
#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