diff options
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Value.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h index 52e7dd2c43..8bd6ecf412 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.h +++ b/Userland/Libraries/LibJS/Runtime/Value.h @@ -9,6 +9,7 @@ #include <AK/Assertions.h> #include <AK/BitCast.h> +#include <AK/Concepts.h> #include <AK/Format.h> #include <AK/Forward.h> #include <AK/Function.h> @@ -131,7 +132,8 @@ public: { } - explicit Value(bool value) + template<typename T> + requires(SameAs<RemoveCVReference<T>, bool>) explicit Value(T value) : m_type(Type::Boolean) { m_value.as_bool = value; |