summaryrefslogtreecommitdiffhomepage
path: root/compat/defs.hpp
blob: 818e004b96c97ef0f9438bb1c0574869a29ca0a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#ifdef _MSC_VER
#   define FUNCTION_NAME __FUNCSIG__
#else
#   define FUNCTION_NAME __PRETTY_FUNCTION__
#endif

#define progn(...) [&]{__VA_ARGS__;}()

#define DECLARE_DEPRECATED_COPY_ASSIGNMENT(type)            \
    [[deprecated]] type(const type&) = default;    \
    [[deprecated]] type& operator=(const type&) = default

#define DECLARE_DELETED_COPY_ASSIGNMENT(type)               \
    type(const type&) = delete;                             \
    type& operator=(const type&) = delete