mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 10:36:24 +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
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Concepts.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
||||
|
@ -282,6 +283,7 @@ struct PartialDurationRecord;
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
requires(!IsLvalueReference<T>)
|
||||
class ThrowCompletionOr;
|
||||
|
||||
template<class T>
|
||||
|
|
|
@ -246,6 +246,7 @@ private:
|
|||
namespace JS {
|
||||
|
||||
template<typename ValueType>
|
||||
requires(!IsLvalueReference<ValueType>)
|
||||
class [[nodiscard]] ThrowCompletionOr {
|
||||
public:
|
||||
ThrowCompletionOr()
|
||||
|
|
Loading…
Reference in a new issue