Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1313

Comment by HolyBlackCat on Creating a trivially constructible object from a char const* without default constructing?

$
0
0
Can you not ensure the buffer is suitably aligned? And then just reinterpret_cast. People will grumble about the lifetimes, but as long as the bytes come from an opaque source, this will never break.

Viewing all articles
Browse latest Browse all 1313


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>