[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement <concepts> header

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 19:24:07 PDT 2018


CaseyCarter added inline comments.


================
Comment at: include/concepts:193
+#endif
+#if 0 // FIXME: File LWG issue
+    requires(_From (&_Fn)()) { static_cast<_To>(_Fn()); };
----------------
I suppose it would have been a good idea to fix this before submitting the patch for review - but it's too late now.

The issue here is that `ConvertibleTo` as specified rejects all conversions from array and function types. While this makes sense on the one hand - there are no expressions of array or function type from which to convert - it is a difference relative to `is_convertible` that I don't think any of the LEWG/LWG design discussions considered.

This conditional should be either removed, or the condition "flipped" so the concept definition agrees with the working draft. The affected test cases need to be conditional as well.


https://reviews.llvm.org/D49120





More information about the cfe-commits mailing list