dep-gsl/tests
maflcko fcf3fe37c6
gsl::not_null: C.89: Make a hash noexcept (#1236)
Without this change, the guideline
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c89-make-a-hash-noexcept
would be violated.

The test fails before the changes here:

```
tests/pointers_tests.cpp:102:23: error: static assertion failed due to requirement 'noexcept(std::hash<gsl::not_null<std::shared_ptr<int>>>{}(std::declval()))': gsl::not_null hash operator must be noexcept
  102 |         static_assert(noexcept(std::hash<Key>{}(std::declval<Key>())),
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/pointers_tests.cpp:108:23: error: static assertion failed due to requirement 'noexcept(std::hash<gsl::strict_not_null<std::shared_ptr<int>>>{}(std::declval()))': gsl::strict_not_null hash operator must be noexcept
  108 |         static_assert(noexcept(std::hash<Key>{}(std::declval<Key>())),
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2026-03-23 12:18:30 -06:00
..
algorithm_tests.cpp More checks for non-compilable code, plus fix for span (#1180) 2025-01-04 11:50:31 -06:00
assertion_tests.cpp cleanup natvis (#1077) 2022-12-29 10:21:11 -08:00
at_tests.cpp 1075 Wrong Expects in gsl::at? (#1076) 2023-01-18 13:33:20 -08:00
byte_tests.cpp More checks for non-compilable code, plus fix for span (#1180) 2025-01-04 11:50:31 -06:00
CMakeLists.txt infra: individual test executables (#1212) 2025-12-05 13:24:15 -07:00
CMakeLists.txt.in fix various pipeline failures (#1172) 2024-11-25 12:58:45 -06:00
constexpr_notnull_tests.cpp Add constexpr to not_null comparison operators (#1208) 2025-05-22 11:52:47 -06: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 std::hash compilation error for gsl::not_null<std::shared_ptr<T>> (#1210) 2025-12-05 10:00:06 -07:00
owner_tests.cpp More checks for non-compilable code, plus fix for span (#1180) 2025-01-04 11:50:31 -06:00
pointers_tests.cpp gsl::not_null: C.89: Make a hash noexcept (#1236) 2026-03-23 12:18:30 -06:00
span_compatibility_tests.cpp Better use of std::enable_if (#1177) 2024-12-23 10:40:22 -06:00
span_ext_tests.cpp 1075 Wrong Expects in gsl::at? (#1076) 2023-01-18 13:33:20 -08:00
span_tests.cpp fix: all pipeline failures (#1221) 2025-09-30 15:10:46 -06:00
strict_notnull_tests.cpp introduce gsl::not_null<T>::element_type (#1196) 2025-02-12 09:16:05 -06:00
utils_tests.cpp Clean up final_act and finally, closes #846 (#977) 2022-10-10 16:09:21 -07:00