From e45cf158e246e9d0ddfa1fc5be974d981960345c Mon Sep 17 00:00:00 2001 From: Alireza Kheradmand Date: Mon, 5 Feb 2024 04:44:50 +0100 Subject: [PATCH] [Util] Mark conversion of `Pooled` to its reference as `explicit` --- include/mutable/util/Pool.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mutable/util/Pool.hpp b/include/mutable/util/Pool.hpp index 4736b5c9..34fd6bf7 100644 --- a/include/mutable/util/Pool.hpp +++ b/include/mutable/util/Pool.hpp @@ -261,7 +261,7 @@ struct Pooled Pooled & operator=(Pooled other) { swap(*this, other); return *this; } - operator const T & () const { return Pool::Get(*this); } + explicit operator const T & () const { return Pool::Get(*this); } operator const T * () const { return &Pool::Get(*this); } const T & operator*() const { return Pool::Get(*this); }