rsmith added inline comments.

================
Comment at: include/string:782
     _LIBCPP_INLINE_VISIBILITY
     basic_string(const value_type* __s, size_type __n);
     _LIBCPP_INLINE_VISIBILITY
----------------
EricWF wrote:
> rsmith wrote:
> > Did you skip this one intentionally?
> Yes. `size_type`  is a typedef for `allocator_traits<Allocator>::size_type`, 
> This causes the `basic_string(CharT*, Allocator const&)` to always be chosen 
> instead, resulting in a incorrect allocator type.
I don't think it will always be chosen instead; if the argument is of type 
`size_t`, the `(const CharT*, size_type)` overload should be chosen.


https://reviews.llvm.org/D29863



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to