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

Edward Welbourne edward.welbourne at qt.io
Wed Oct 12 11:04:06 CEST 2022


Henry Skoglund (11 October 2022 22:18) wrote:
> Sometime in the far future when Qt requires c++20 things might
> improve: we could use std::source_location::filename
> (https://en.cppreference.com/w/cpp/utility/source_location/file_name )

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.

More things to look forward to when we eventually get to C++20 ...

	Eddy.


More information about the Development mailing list