, , . , const , . , , ( , , const_cast, const). , , , [] .
,
void function( const double& x ) {
double non_aliased_x = x;
...
}
, .
Another way to deal with an alias is to use some sort of classifier restrictin the style of C99
void function( const double& restrict x ) {
but then again, even in this case, the cons of following the link are likely to outweigh the pros, as explained in other answers.
source
share