mirror of
https://github.com/fraillt/bitsery.git
synced 2026-08-18 17:20:00 +00:00
fix: std::variant access with get_if using index
This commit is contained in:
committed by
Mindaugas Vinkelis
parent
126a6c2971
commit
4ff80c6426
@@ -59,7 +59,7 @@ namespace bitsery {
|
||||
// reference heap data, so if `data` is already holding the requested
|
||||
// variant then we'll deserialize into the existing object
|
||||
if constexpr (!std::is_trivial_v<TElem>) {
|
||||
if (auto item = std::get_if<TElem>(&data)) {
|
||||
if (auto item = std::get_if<Index>(&data)) {
|
||||
this->serializeType(des, *item);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user