فهرست منبع

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

Michele Caini 2 سال پیش
والد
کامیت
a28ff99b08
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      test/common/boxed_type.h

+ 4 - 0
test/common/boxed_type.h

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