Modern C++ refers to the evolution of the C++ programming language beyond its original design principles, incorporating newer features, idioms, and best practices that have emerged since the language's inception.
C++ is standardized by the International Organization for Standardization (ISO). C++ standards are typically released every few years, bringing new features and improvements to the language.
Modern C++ introduces a range of new features aimed at improving code clarity, safety, and performance. Smart pointers were a great addition. Indeed, they provide safer and more convenient memory management compared to raw pointers.
Smart pointers are now popular and widely used in C++ projects. A quick look at some of the most popular C++ projects on GitHub shows that smart pointers are often the preferred way to manage pointers.
However, raw pointers are still part of the language, and many developers continue to use them. So why not help developers use smart pointers by allowing the compiler to enforce their use? The proposal consists of adding a new attribute to specify that a class cannot use raw pointers as field types or method parameter types.

This way, the compiler could prevent raw pointers from being used in the class :)
Furthermore, I think it would be useful to add a [[modern]] attribute to indicate that a class follows modern C++ practices.

The compiler could then reject legacy C++ practices within that class.
Another suggestion concerns how shared pointers are declared. Since smart pointers are now widely used, why not provide a shorthand syntax for declaring a shared pointer? Instead of typing:
std::shared_ptr<Test> ptr_name;
you could simply write:
ref Test ptr_name;
While these proposals may not introduce major new capabilities to the language, it would be valuable to provide mechanisms that allow the compiler to protect code from some of the pitfalls associated with legacy C++ practices.
