piranha
0.10
|
Forwarding macros. More...
#include <type_traits>
#include <utility>
Go to the source code of this file.
Macros | |
#define | PIRANHA_FORWARDING_CTOR(Derived, Base) |
Constructor-forwarding macro. More... | |
#define | PIRANHA_FORWARDING_ASSIGNMENT(Derived, Base) |
Assignment-forwarding macro. More... | |
Forwarding macros.
This header contains macros to forward constructors and assignment operators to a base class.
Definition in file forwarding.hpp.
#define PIRANHA_FORWARDING_ASSIGNMENT | ( | Derived, | |
Base | |||
) |
Assignment-forwarding macro.
This macro will declare and define a generic assignment operator for class Derived
. The operator will perfectly forward the argument to the base class Base
, and it is enabled only if the base class is assignable from the generic argument. In order to avoid clashes with copy/move assignment operators, in case the argument derives from Derived
the operator will be disabled.
Definition at line 68 of file forwarding.hpp.
#define PIRANHA_FORWARDING_CTOR | ( | Derived, | |
Base | |||
) |
Constructor-forwarding macro.
This macro will declare and define an explicit constructor for class Derived
that accepts a variadic set of arguments whose size is greater than zero. The constructor will perfectly forward the arguments to the base class Base
, and it is enabled only if the base class is constructible from the set of arguments. In order to avoid clashes with copy/move constructors, in case the only argument derives from Derived
the constructor will be disabled.
Definition at line 50 of file forwarding.hpp.