3 ms·
> C++ is never just C++. The build system for any C++ program includes both macro language and some form of make and/or make replacement. Your comment makes no
by geezerjay 9y ago
> C++ is never just C++. The build system for any C++ program includes both macro language and some form of make and/or make replacement.
Your comment makes no sense, and shows some confusion. C++ is a programming language. That's what's being discussed here. You, on the other hand, are talking about build systems and how sofrware projects may be configured by some people. That is besides the point and actually completely misses the very topic being discussed. It's entirely irrelevant if you can fill a whole header with #define or write a convoluted macro with m4 to write it for you. That's not how a programming language like C++ implements compile-time constant expressions. That's acvomplished with C++'s support for constexpr.
- uncle_bob 9y agoIs there a C++ compiler that doesn't include 'make' and/or a 'make' replacement? There are linkage rules and even a few keywords just to allow linkage with code not generated by the compiler. It's very much part of the language. 'extern const int *table;' Having a compile-time program create table would guarantee that it's created at compile time. Having a constexpr does not guarantee it would be done at compile-time, it silently degrades to run-time. If verifying requires an assembly listing, I see it less useful than the currently available tools.
- geezerjay 9y ago> Is there a C++ compiler that doesn't include 'make' and/or a 'make' replacement? Yes, all of them. Because 'make' and/or 'make' replacements have absolutely zero to do with a compiler. It is a build automation tool that essentially determines which target needs to be built based on which preceding targets have been altered. This has zero to do with what a compiler does.