Use launder to access buffer SSO storage
This commit is contained in:
@ -403,7 +403,7 @@ public:
|
|||||||
return buffer.is_on_heap()
|
return buffer.is_on_heap()
|
||||||
? return_type{ buffer.m_data }
|
? return_type{ buffer.m_data }
|
||||||
// NOLINTNEXTLINE(*-reinterpret-cast)
|
// NOLINTNEXTLINE(*-reinterpret-cast)
|
||||||
: reinterpret_cast<return_type>(&buffer);
|
: std::launder(reinterpret_cast<return_type>(&buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user