]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/testsuite/18_support/source_location/srcloc.h
libtdc++: Define std::source_location for C++20
authorJeanHeyd Meneide <phdofthehouse@gmail.com>
Thu, 3 Dec 2020 19:17:13 +0000 (19:17 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 3 Dec 2020 19:17:13 +0000 (19:17 +0000)
commit57d76ee9cf6265e012fad6286adfaeaba9414c11
tree1ff09050c875a5ad18866930b481a3a235e3abf2
parent9e433b3461ab64b38350817392a77efb67bb78b4
libtdc++: Define std::source_location for C++20

This doesn't define a new _GLIBCXX_HAVE_BUILTIN_SOURCE_LOCATION macro.
because using __has_builtin(__builtin_source_location) is sufficient.
Currently only GCC supports it, but if/when Clang and Intel add it the
__has_builtin check should for them too.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* doc/doxygen/user.cfg.in (INPUT): Add <source_location>.
* include/Makefile.am: Add <source_location>.
* include/Makefile.in: Regenerate.
* include/std/version (__cpp_lib_source_location): Define.
* include/std/source_location: New file.
* testsuite/18_support/source_location/1.cc: New test.
* testsuite/18_support/source_location/consteval.cc: New test.
* testsuite/18_support/source_location/srcloc.h: New test.
* testsuite/18_support/source_location/version.cc: New test.
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/std/source_location [new file with mode: 0644]
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/18_support/source_location/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/source_location/consteval.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/source_location/srcloc.h [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/source_location/version.cc [new file with mode: 0644]