Thanks, Mattia
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
std::valarray was created with something sounding like this in mind,
although the critics of it are many.
> Is there any special identifier in the C++ language that a priori say
> that the two variables will not be referencing to the same location?
C99 introduces the restrict keyword which does something like this.
Since some C++ compilers also try to be C compilers, you may find a C+
+ compiler that uses the restrict keyword (or some variant, like
__restrict__) in a similar manner.
There is no equivalent of restrict, albeit there are compiler-specific
extensions.
What you could do, however, is taking a reference to each array, which
would inform the compiler that the memory is distinct.