[libcxx-commits] [PATCH] D147560: [libc++] Fix std::optional-related type deduction
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 4 14:30:07 PDT 2023
philnik requested changes to this revision.
philnik added a comment.
This revision now requires changes to proceed.
This changes behaviour, in a not necessarily conforming way. I don't know why other standard library implementations accept your construct while libc++ doesn't, but this is definitely not the right fix. Interestingly, implementing the constructor yourself works with one standard but not the other: https://godbolt.org/z/GKKGP46fs, and both bug reports use `std::string`. Maybe there lies the real issue? You should probably reduce the reproducer further to find out where the problem actually is.
================
Comment at: libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ambigous_constructor.pass.cpp:19-20
+
+using std::optional;
+using std::string;
+
----------------
Please don't use `using` in the tests.
================
Comment at: libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ambigous_constructor.pass.cpp:33
+int main(int, char**) {
+ Outer __test{{.s = "hello"}};
+
----------------
Please don't use reserved identifiers in the tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147560/new/
https://reviews.llvm.org/D147560
More information about the libcxx-commits
mailing list