KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In the program I am coding, one of my function declarations goes like this: bool parse( const sentence & __restrict sentence ) { // whatever } When I compile the code with Microsoft Visual Studio 2010 Express, the compiler complains: warning C4227: anachronism used : qualifiers on reference are ignored However, this page of GCC’s documentation says: In addition to allowing restricted pointers, you can specify restricted references, which indicate that the reference is not aliased in the local context. And the same page gives a very explicit example: void fn (int *__restrict__ rptr, int &__restrict__ rref) { /* ... */ } Did I misunderstand MVSC’s warning? or should I transform all my references into pointers so that __restrict applies?
Tags (comma-separated)
Save Edits
Cancel