From 57898b10bd7d21e00408f260592d6fbe18589c9b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 4 May 2024 16:56:14 +0300 Subject: [PATCH] Make the conversion operator of Symbol explicit --- source/argumentstore.h | 2 +- source/type.h | 3 ++- source/value.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/argumentstore.h b/source/argumentstore.h index e7a3c55..e2f38c5 100644 --- a/source/argumentstore.h +++ b/source/argumentstore.h @@ -33,7 +33,7 @@ public: template typename TypeInfo::Load get(unsigned i) const { - return extract::Store>(store+info.arg_offsets[i], info.key.signature[i]); + return static_cast::Load>(extract::Store>(store+info.arg_offsets[i], info.key.signature[i])); } private: diff --git a/source/type.h b/source/type.h index 4eb07bc..9823dff 100644 --- a/source/type.h +++ b/source/type.h @@ -17,7 +17,8 @@ struct Symbol template Symbol(const T &n): name(lexical_cast(n)) { } - template operator T() const { return lexical_cast(name); } + template + explicit operator T() const { return lexical_cast(name); } }; struct IntType diff --git a/source/value.h b/source/value.h index ba61181..9dbd192 100644 --- a/source/value.h +++ b/source/value.h @@ -29,7 +29,7 @@ public: template typename TypeInfo::Load get() const - { return get_::Store>(); } + { return static_cast::Load>(get_::Store>()); } char get_signature() const { return sig; } private: -- 2.45.2