|
-
December 5th, 2012, 03:04 AM
#4
Re: matrixarray
 Originally Posted by nuzzle
they are accessed according to different matrix abstractions (and more can be added).
I think this is not advisable; that use of unions relies on specific guarantees related to not-so-manifest properties of the types involved. Even with POD's you have to make sure that those member types have the same memory layout. Yes, with C++11 things have been relaxed to allow standard memory layout types with compatible layouts ( so, say, you could put there an std::array ) but it's still non trivial to check that the code is actually portable. So, I'd leave this technique to implementation details only.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|