[libcxx-commits] [PATCH] D80376: [libc++] [P1208] [C++20] Adopt source location from Library Fundamentals V3 for C++20.
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 18 03:46:38 PDT 2020
curdeius marked an inline comment as done.
curdeius added inline comments.
================
Comment at: libcxx/include/source_location:47
+struct source_location {
+ // TODO: current() should be marked consteval instead of constexpr,
+ // but current compiler implementations seem buggy and return callee's location.
----------------
ldionne wrote:
> I think we need to figure out this issue before we move forward.
I still don't know why it doesn't work with `consteval`, but I've seen that libstdc++ experimental implementation also uses `constexpr` here: https://github.com/gitGNU/gcc/blob/master/libstdc%2B%2B-v3/include/experimental/source_location#L50
Also, I've just rechecked it and it only fails with gcc, it passes all the tests with clang 10.
I remember however doing some manual testing on clang on Windows (an older version, probably 9) and it was failing too.
I'll check how other clang versions behave.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80376/new/
https://reviews.llvm.org/D80376
More information about the libcxx-commits
mailing list