summaryrefslogtreecommitdiffhomepage
path: root/compat/defs.hpp
blob: 36c6a034dc39ab545c60cd8c71499a12758ca331 (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