I will take a crack at "why not?"
restrict
is basically just an assertion that the compiler cannot verify. (Or more precisely, when the compiler can verify it, the assertion itself is not helpful.) This is just not the sort of thing that the C++ committee is going to like. C++ has always tended to assume "sufficiently smart compilers"; heck, look at the hideous performance of the most trivial C++ libraries before the compilers caught up.
I also suspect the committee felt that defining restrict
semantics precisely in the presence of all the other C++ features (references, rvalue references, blah blah blah) would be non-trivial.
So, non-trivial to specify + "a sufficiently smart compiler doesn't need it" = NAK.
const
orvolatile
are applied to a member function. (e.g.[]() restrict(direct3d) {}
.) – DistressC++AMP
and got information about cyclic AMP. Oh, biology... – Respiterestrict
means? (I know it means you are claiming that the pointed-to object is not aliased, but some people might not...) – Platypusrestrict
, so that the spec can more simply be implemented by compiler vendors that support C99 as well. – Halophyte__restrict
in c++ code – Sacellum