[Development] C++20 goodies (was: Using '#pragma once' instead of include guards?)

Richard Weickelt richard at weickelt.de
Thu Oct 13 21:21:10 CEST 2022


> Nice.  I'm a bit surprised file_name() returns a char* rather than a
> std::filesystem::path, but it'll do.  It's also nice to see
> source_location has a function_name() that can finally unify the
> disparate ways of getting that information.
> 

The advantages are for instance that file_name() does even work on tiny bare 
metal targets without heap. It can be processed in constexpr at 
compile-time. const char* gives the user a lot of freedom to decide what to 
pay for.


More information about the Development mailing list