Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
variant-wrapper.hh
Go to the documentation of this file.
1#pragma once
3
4// not used, but will be used by callers
5#include <variant>
6
11// NOLINTBEGIN(bugprone-macro-parentheses)
12#define FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
13 CLASS_NAME(const CLASS_NAME &) = default; \
14 CLASS_NAME(CLASS_NAME &) = default; \
15 CLASS_NAME(CLASS_NAME &&) = default; \
16 \
17 CLASS_NAME & operator =(const CLASS_NAME &) = default; \
18 CLASS_NAME & operator =(CLASS_NAME &) = default;
19// NOLINTEND(bugprone-macro-parentheses)
20
27#define MAKE_WRAPPER_CONSTRUCTOR(CLASS_NAME) \
28 FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
29 \
30 CLASS_NAME(auto &&... arg) \
31 : raw(std::forward<decltype(arg)>(arg)...) \
32 { }