qt6-bb10/tests/auto/corelib/tools/qspan
Marc Mutz 94e122c594 QSpan: make adl_begin() etc SFINAE-friendly
The definition of iterator_t, and, therefore, of is_compatible_range
depends on this, otherwise say, 0, is being treated as a valid range
and hits a hard error in adl_begin() when trying to call begin(int&).

TIL: decltype(auto) does _not_ SFINAE.

Fix by calculating the return type manually, re-enabing SFINAE.

Pick-to: 6.7 6.6
Change-Id: Icacd70554f4050ecaeb396c9ae60bc4f21a220c9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-01-26 23:50:57 +01:00
..
CMakeLists.txt Long live QSpan as public API! 2023-12-07 22:38:15 +00:00
tst_qspan.cpp QSpan: make adl_begin() etc SFINAE-friendly 2024-01-26 23:50:57 +01:00