Nix 2.26.3
Nix, the purely functional 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#define FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
12 CLASS_NAME(const CLASS_NAME &) = default; \
13 CLASS_NAME(CLASS_NAME &) = default; \
14 CLASS_NAME(CLASS_NAME &&) = default; \
15 \
16 CLASS_NAME & operator =(const CLASS_NAME &) = default; \
17 CLASS_NAME & operator =(CLASS_NAME &) = default;
18
25#define MAKE_WRAPPER_CONSTRUCTOR(CLASS_NAME) \
26 FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
27 \
28 CLASS_NAME(auto &&... arg) \
29 : raw(std::forward<decltype(arg)>(arg)...) \
30 { }