Hacker News new | past | comments | ask | show | jobs | submit login

> A C++ compiler can infer nothing about aliasing from a function declaration.

True. but you don't solely rely on the declaration, do you? lots of power comes from static analysis.




It’s important to only rely on the declaration, for a few reasons. One of the simpler ones is that the body may be in another translation unit.


You do solely rely on the declaration.

From P3465: "why this is a scalable compile-time solution, because it requires only function-local analysis"

Profiles uses local analysis, as does borrow checking. Whole program analysis is something you don't want to mess with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: