4 ms·
AIUI, this could be checked at compile time, but you could be calling a function that was brought in at link time so what's the point?
by fnord123 9y ago
AIUI, this could be checked at compile time, but you could be calling a function that was brought in at link time so what's the point?
- AstralStorm 9y agoYou could add some extra metadata descriptor to a function at a cost of space and checks... (like some functional languages do)
- pjmlp 9y agoGood luck trying to convince C++ devs to add metadata to their binaries. One reason why we have always to come up with our reflection solutions was because of this.
- Someone 9y agoC++ adds metadata to binaries all the time, via name mangling (https://en.wikipedia.org/wiki/Name_mangling https://en.wikipedia.org/wiki/Name_mangling) noexcept is part of the function type since C++17, so it will be encoded in binaries (https://stackoverflow.com/questions/46798456/handling-gccs-noexcept-type-warning https://stackoverflow.com/questions/46798456/handling-gccs-n...)
- pjmlp 9y agoI doubt many would consider it metadata, specially since it goes away for all non public symbols on release builds.