XTE_FWD()

Defined in header <xieite/preproc/fwd.hpp>

Replaces std::forward().


Definitions

#fwd
#define XTE_FWD(...) static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
Functions exactly like std::forward() without requiring a template argument.


Example

void foo(int&&) {}

void bar(auto&& x) {
	foo(XTE_FWD(x));
}

int main() {
	bar(0);
}
[View in Compiler Explorer]