Welcome to East const Central
This page is for understanding and following the latest thinking on East const, sometimes called Consistent const.
Briefly, the rule for const is: const applies to what is on its left, unless there is nothing on its left, then it applies to what is on its right.
The rule for East const is: Always put const on the right of what it modifies. This makes the const rule very simple: const applies to what is on its left.
There are several arguments for why this is a superior approach. If you’d like to add your’s or a link to a related topic, please contact me at “eastconst” at this domain.
Here are some links:
- Jon Kalb’s Rant
- Jon’s Discussion on CppCast
- Dan Saks’s on Simplying const Syntax
- SO Q&A
- Remwein’s Reddit post
- SuperFAQ Q&A
- Slack channel for East const