[libcxx-commits] [PATCH] D99461: [libcxx] adds `std::indirectly_readable_traits` to <iterator>

Tim Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 7 19:57:40 PDT 2021


tcanens added inline comments.


================
Comment at: libcxx/include/iterator:517
+
+// This specialisation is not standard, but is necessary to placate GCC. Neither Clang nor MSVC
+// require it.
----------------
cjdb wrote:
> tcanens wrote:
> > What does "placate GCC" mean in this context? The standard implies that this case (have both, but inconsistent) is a hard error, since we can't decide on the specialization to pick. It's certainly debatable whether it should be though.
> Both [[ https://godbolt.org/z/nrcc8bjo1 | GCC trunk and MSVC ]] (with their respective native libraries) compile the test file (and IIRC so does MSVC with this implementation regardless of the specialisation we're discussing). I happen to agree with the implementations being the right course of action, even if the wording implies something else.
> 
> Maybe I should issue a library defect if one isn't already in the pipeline.
Fascinating. Looks like both MSVC and Clang treat the ambiguous partial specialization as a concept check failure rather than a hard error - but MSVC doesn't SFINAE on it... (libstdc++ adds this same specialization.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99461/new/

https://reviews.llvm.org/D99461



More information about the libcxx-commits mailing list