Connecting Tech Pros Worldwide Forums | Help | Site Map

Restrict pointers?

Frederick Gotham
Guest
 
Posts: n/a
#1: Jun 30 '06

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

TB
Guest
 
Posts: n/a
#2: Jun 30 '06

re: Restrict pointers?


Frederick Gotham skrev:[color=blue]
> 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?
>[/color]

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

--
TB @ SWEDEN
Bo Persson
Guest
 
Posts: n/a
#3: Jun 30 '06

re: Restrict pointers?



"Frederick Gotham" <fgothamNO@SPAM.com> skrev i meddelandet
news:WMepg.10860$j7.315106@news.indigo.ie...[color=blue]
>
> 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?[/color]

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


Closed Thread