[libc++] Fix constraints for string_view's iterator/sentinel constructor
authorJoe Loser <joeloser93@gmail.com>
Wed, 24 Nov 2021 20:35:15 +0000 (15:35 -0500)
committerJoe Loser <joeloser93@gmail.com>
Thu, 25 Nov 2021 16:39:59 +0000 (11:39 -0500)
commit68e7e76a9be022427e572101cde4e00203c9af46
tree8075fd4ed762a618fb1ceff1aca216984ab75ee7
parent976bb4724c04ef7570d49a0639bba270128bd72c
[libc++] Fix constraints for string_view's iterator/sentinel constructor

The `string_view` constructor taking an iterator/sentinel uses concepts
instead of type traits like the Standard states. Using `same_as` instead
of `is_same_v` should be harmless. Prefer `std::is_same_v` instead which is
cheaper to compile. Replace `convertible_to` with `is_convertible_v` as
well.

This observation came up while working on
https://reviews.llvm.org/D113161

Differential Revision: https://reviews.llvm.org/D114561
libcxx/include/string_view