|
Boost : |
Subject: Re: [boost] Review manager for Boost QVM?
From: Peter Dimov (lists_at_[hidden])
Date: 2014-06-06 18:28:02
Emil Dotchevski wrote:
> You need a cast, and my understanding is that that makes your code not
> portable because it violates the strict aliasing rule.
For float v[4][4], &v[0][0] is not a cast and gives you a float* p such that
the elements are in [p+0, p+16).
A reinterpret_cast to float(&)[16] is an interesting theoretical question. I
think that it doesn't violate the aliasing rules, but g++ is in the habit of
disagreeing with such statements.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk