By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,523 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,523 IT Pros & Developers. It's quick & easy.

Restrict pointers?

P: n/a

I did a search through the C++ Standard there, and couldn't find any
mention of "restrict" or "__restrict__". Firstly, could someone please
confirm whether "restrict" is mentioned in the C++ Standard?

A quick search of the web shows up a few pages which imply that C++ has a
"__restrict__" keyword... is there any truth to this?
Basically my question is:

Does C++ have restrict pointers?

--

Frederick Gotham
Jun 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
TB
Frederick Gotham skrev:
I did a search through the C++ Standard there, and couldn't find any
mention of "restrict" or "__restrict__". Firstly, could someone please
confirm whether "restrict" is mentioned in the C++ Standard?

A quick search of the web shows up a few pages which imply that C++ has a
"__restrict__" keyword... is there any truth to this?
Basically my question is:

Does C++ have restrict pointers?


No, only C99 has the keyword restrict, not C++, unless
provided as a compiler extension.

--
TB @ SWEDEN
Jun 30 '06 #2

P: n/a

"Frederick Gotham" <fg*******@SPAM.com> skrev i meddelandet
news:WM*******************@news.indigo.ie...

I did a search through the C++ Standard there, and couldn't find any
mention of "restrict" or "__restrict__". Firstly, could someone
please
confirm whether "restrict" is mentioned in the C++ Standard?

A quick search of the web shows up a few pages which imply that C++
has a
"__restrict__" keyword... is there any truth to this?
Basically my question is:

Does C++ have restrict pointers?


No, that is a C99 feature.

It would also be less useful in C++, where passing multiple pointers
to primitive types is less common. Parameters of different class types
are already known not to have an alias problem.
Bo Persson
Jun 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.