فهرست منبع

bugfix: use explicit cast to underlying_type

Sam Jaffe 2 سال پیش
والد
کامیت
974596108e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      include/opaque_typedef/opaque_typedef.hpp

+ 3 - 1
include/opaque_typedef/opaque_typedef.hpp

@@ -115,6 +115,8 @@ namespace types {
      */
     constexpr value_type const & get() const { return value_; }
     constexpr explicit operator value_type const &() const { return value_; }
-    constexpr underlying_type operator*() const { return value_; }
+    constexpr underlying_type operator*() const {
+      return static_cast<underlying_type>(value_);
+    }
   };
 }