diff options
author | Matthew Olsson <matthewcolsson@gmail.com> | 2023-02-25 10:43:48 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-06 13:05:43 +0000 |
commit | d4b08b719652c5ad949ffd2b1007a5aeec7c3d06 (patch) | |
tree | 7cb8ad4ffe41552310777748f5b9a20a5ec9de7b /Userland/Libraries/LibJS | |
parent | 17a528c49e250ffd6c64d680e9a28fe112483852 (diff) | |
download | serenity-d4b08b719652c5ad949ffd2b1007a5aeec7c3d06.zip |
LibJS: Use a forwarding reference in ThrowCompletion constructor
This avoids compiler complaints when trying to use const types
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Completion.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h index d7671c40ce..c4b07bd48c 100644 --- a/Userland/Libraries/LibJS/Runtime/Completion.h +++ b/Userland/Libraries/LibJS/Runtime/Completion.h @@ -307,7 +307,7 @@ public: // Most commonly: Value from Object* or similar, so we can omit the curly braces from "return { TRY(...) };". // Disabled for POD types to avoid weird conversion shenanigans. template<typename WrappedValueType> - ThrowCompletionOr(WrappedValueType const& value) + ThrowCompletionOr(WrappedValueType&& value) requires(!IsPOD<ValueType>) : m_value_or_throw_completion(ValueType { value }) { |