mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibJS: Explicitly disallow references in ThrowCompletionOr
This will be disallowed by TRY soon, but the compile error produced by this requirement will pinpoint the errant line more accurately.
This commit is contained in:
parent
a59ebdac2d
commit
3de75f6436
2 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Concepts.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
|
||||||
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
||||||
|
@ -282,6 +283,7 @@ struct PartialDurationRecord;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires(!IsLvalueReference<T>)
|
||||||
class ThrowCompletionOr;
|
class ThrowCompletionOr;
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
|
@ -246,6 +246,7 @@ private:
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
|
requires(!IsLvalueReference<ValueType>)
|
||||||
class [[nodiscard]] ThrowCompletionOr {
|
class [[nodiscard]] ThrowCompletionOr {
|
||||||
public:
|
public:
|
||||||
ThrowCompletionOr()
|
ThrowCompletionOr()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue