[ PATCH ] [ C++ ] [ libstdc++ ] P1208r6 Merge source_location
Jakub Jelinek
jakub@redhat.com
Fri Dec 27 19:33:00 GMT 2019
On Fri, Dec 27, 2019 at 02:27:12PM -0500, JeanHeyd Meneide wrote:
> This patch implements std::source_location. There's a couple
> cases where the builtin implemented does not do what is expected of
> it, and so the bottom 3 batches of test cases fails. I'm still
> including the patch so that others can pick up on what might need to
> change about the __builtin_source_location implementation (CC:
> Jonathan Wakely, Jakub Jelinek).
>
> 2019-12-27 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
>
> * include/Makefile.in: add source_location header
> * include/bits/c++config: Add new detection macros for
> LINE, COLUMN, and SOURCE_LOCATION builtins.
> * include/std/source_location: New.
> * testuite/std/support/srcloc/std.n4842.C (new): test source_location
> * testuite/std/support/srcloc/std.n4842.h (new): test source_location
This will be ABI incompatible between GCC and Clang, that doesn't look like
a good idea to me. I thought the plan is to use what you have in the
_GLIBCXX_HAVE_BUILTIN_SOURCE_LOCATION case always, except that if
__builtin_source_location isn't available, initialize _M_data to nullptr.
Jakub
More information about the Libstdc++
mailing list