Sfoglia il codice sorgente

test: boxed_type<T>::operator T()

Michele Caini 2 anni fa
parent
commit
a28ff99b08
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      test/common/boxed_type.h

+ 4 - 0
test/common/boxed_type.h

@@ -6,6 +6,10 @@ namespace test {
 template<typename Type>
 struct boxed_type {
     Type value{};
+
+    operator Type() const noexcept {
+        return value;
+    }
 };
 
 template<typename Type>