Everywhere: Fully qualify IsLvalueReference in TRY() macros

If USING_AK_GLOBALLY is not defined, the name IsLvalueReference might
not be available in the global namespace. Follow the pattern established
in LibTest to fully qualify AK types in macros to avoid this problem.
This commit is contained in:
Andrew Kaster 2023-01-14 16:34:44 -07:00 committed by Linus Groh
commit f5d253dcfa
Notes: sideshowbarker 2024-07-17 21:26:19 +09:00
11 changed files with 96 additions and 95 deletions

View file

@ -42,14 +42,14 @@
namespace Web::Fetch::Fetching {
#define TRY_OR_IGNORE(expression) \
({ \
auto _temporary_result = (expression); \
if (_temporary_result.is_error()) \
return; \
static_assert(!IsLvalueReference<decltype(_temporary_result.release_value())>, \
"Do not return a reference from a fallible expression"); \
_temporary_result.release_value(); \
#define TRY_OR_IGNORE(expression) \
({ \
auto _temporary_result = (expression); \
if (_temporary_result.is_error()) \
return; \
static_assert(!::AK::Detail::IsLvalueReference<decltype(_temporary_result.release_value())>, \
"Do not return a reference from a fallible expression"); \
_temporary_result.release_value(); \
})
// https://fetch.spec.whatwg.org/#concept-fetch