Closed tigran2008 closed 4 months ago
P.S.: I felt the need of an etl::forward while implementing the C++20 formatting library using ETL. More specifically, std::basic_format_args
Alright, well, this is awkward. Looks like it was already in the library. I didn't find it in the docs, though. Isn't it supposed to be here? https://www.etlcpp.com/utility.html
EDIT: Looks like it's already in the library, but undocumented!
https://en.cppreference.com/w/cpp/utility/forward
It's very simple to add:
In order to test:
ForwardTest::test(0)
would be equal toForwardTest::RVALUE
, whereasForwardTest(ForwardTest::some_lvalue)
would be equal toForwardTest::LVALUE
. To add this test totest/test_utility.cpp
: