logoalt Hacker News

omoikane • today at 12:57 AM • 1 reply • view on HN

> P0085R5 “Oo… adding a coherent character sequence to begin octal-literals”

Deprecating 0-prefix octal literals is probably setting up many popular repositories for cleanup churn.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p00...

Seems like if a piece of code wants to compile free of diagnostics before and after C++29, it will need to avoid octal literals altogether, or maybe select the octal literal based on `__cplusplus` version, both seem ugly.


Replies

sgerenser • today at 1:35 AM

How many C++ programs, particularly ones looking to be compiled with a modern compiler, use octal literals? I’ve personally never seen them used in my 20 years of using C++. Maybe something dealing with Unix file permissions?