This commit is contained in:
2022-08-31 22:16:16 +02:00
parent 10dbcbeef7
commit a9f5d783ee
3 changed files with 14 additions and 0 deletions

View File

@@ -38,4 +38,11 @@ static constexpr __always_inline void io_class__update_with(T& dst, const T& src
const_cast<volatile DST_VALUE&>(dst.raw_value) = src.raw_value;
}
template<typename T, typename U>
static constexpr __always_inline void io_class__update_with(T& dst, const U& src) {
typedef decltype(dst.raw_value) DST_VALUE;
const_cast<volatile DST_VALUE&>(dst.raw_value) = src;
}
#endif //!__JABYENGINE_IO_CLASS_HELPER_HPP__