[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 16 16:56:43 PST 2017


rsmith added a comment.

Other than (5), all the failing cases look like they should fail per the current `basic_string` spec.



================
Comment at: test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp:57
+  { // Testing (2)
+    // FIXME: (2) doesn't work with implicit deduction.
+    // const test_allocator<char> alloc{};
----------------
I think that at least matches the standard as-is. I'm not sure this case is worth adding an explicit deduction guide for. *shrug*


================
Comment at: test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp:107
+  { // Testing (5) w/o allocator
+#if 0 // FIXME: This doesn't work
+    const std::string sin("abc");
----------------
Do you know why not?


================
Comment at: test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp:291
+  { // Testing (15)
+    // FIXME: This overload is broken. Fix it and add tests.
+  }
----------------
I think the inability to deduce using this overload matches the standard. I don't think there's any way in general to map the type `T` to a `charT`.


https://reviews.llvm.org/D29863





More information about the cfe-commits mailing list