Explorar o código

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

Michele Caini %!s(int64=2) %!d(string=hai) anos
pai
achega
a28ff99b08
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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>