v.g.vassilev added a comment. In https://reviews.llvm.org/D29877#766301, @rsmith wrote:
> In https://reviews.llvm.org/D29877#766196, @EricWF wrote: > > > No. But I can point you to `range-v3` which uses this pattern and I think > > the idiom is somewhat appealing, but that's orthogonal to Clang diagnosing > > it. > > > I found this: > > https://github.com/ericniebler/range-v3/blob/a4829172c0d6c43687ba213c54f430202efd7497/include/range/v3/view/zip_with.hpp#L44 > > This code is wrong, and creates ODR violations on lines 190 and 200. > > It seems to me that the warning is firing on dangerous / broken code (yay!) > but the warning is not sufficient to explain *why* the code is broken (boo!). Perhaps we can complement this with a note, explaining the linkage situation if we fire the warning in a header file... https://reviews.llvm.org/D29877 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits