GSL/tests
Herb Sutter 7d49d4b45d
Clean up final_act and finally, closes #846 (#977)
Somewhere along the way, GSL's implementation of final_act and finally seems to have become way overthought. This PR is to re-simplify these facilities back to what C++ Core Guidelines C.30 said which is simple and clear and works. It just copies the invocable thing, and doesn't bother trying to optimize the copy. This should be fine, because we're typically passing something that's cheap to copy, often a stateless lambda.

The problem in #846 appears to be because finally looks like was originally written as a const&/&& overload (its state at the time that issue was opened)... to eliminate a copy when you invoke it with a temporary. If so, then the && was probably never intended to be a forwarder, but an rvalue reference that tripped over the horrid C++ syntax collision where a && parameter magically instead means a forwarding reference because the type happens to be a template parameter type here. So I suspect the original author was just trying to write an rvalue overload, and the forwarder that's there now was never intended at all.
2022-10-10 16:09:21 -07:00
..
algorithm_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
assertion_tests.cpp gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
at_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
byte_tests.cpp gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
CMakeLists.txt Suppress -Wfloat-equal warning in implementation of gsl::narrow (#1043) 2022-04-14 11:08:28 -07:00
CMakeLists.txt.in Fix googletest build failure with gcc 11.1+ (#1015) 2021-11-17 12:24:40 -08:00
deathTestCommon.h gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
no_exception_ensure_tests.cpp Fix iPhone simulator CI (#981) 2021-05-13 10:52:09 -07:00
notnull_tests.cpp Fix Clang-tidy 15 warnings (#1058) 2022-10-06 09:44:39 -07:00
owner_tests.cpp gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
span_compatibility_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
span_ext_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
span_tests.cpp Make gsl::span's iterators use the contiguous_iterator concept (#1035) 2022-03-22 13:20:54 -07:00
strict_notnull_tests.cpp gsl::at behavior change regarding gsl::span (#985) 2021-05-20 18:18:08 -07:00
string_span_tests.cpp Fix/implement C++2020 compilation, tests, and CI (#1017) 2021-12-09 14:54:06 -08:00
utils_tests.cpp Clean up final_act and finally, closes #846 (#977) 2022-10-10 16:09:21 -07:00