I was trying to figure out if boost::aligned_storage was POD so I looked at the header. It looks like the internal implementation type is a POD, but the actual aligned_storage itself is not. However, that implementation type is exposed through a public typedef. Is it safe for me to use the typedef if I really do need a POD type and don't mind losing the safety of being noncopyable? Is opting out of that tradeoff what the typedef is there for?
AMDG Joseph Garvin wrote:
I was trying to figure out if boost::aligned_storage was POD so I looked at the header. It looks like the internal implementation type is a POD, but the actual aligned_storage itself is not. However, that implementation type is exposed through a public typedef. Is it safe for me to use the typedef if I really do need a POD type and don't mind losing the safety of being noncopyable?
The typedef is documented, so yes it's safe to use it.
Is opting out of that tradeoff what the typedef is there for?
In Christ, Steven Watanabe
participants (2)
-
Joseph Garvin
-
Steven Watanabe