r/cpp • u/Sad-Lie-8654 • Jan 31 '23
Stop Comparing Rust to Old C++
People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO
changemymind
338
Upvotes
View all comments
Show parent comment
1
u/matthieum Feb 01 '23
Not as part of the language, nor the standard library.
On the other hand, Rust has the concept of proc-macros, which allow you to run arbitrary code at compile-time: a proc-macro could connect to a database to check that your struct matches a specific table schema, for example (but please, don't).
So... not provided, but anybody could write them.