[all-commits] [llvm/llvm-project] 68e7e7: [libc++] Fix constraints for string_view's iterato...

Joseph Loser via All-commits all-commits at lists.llvm.org
Thu Nov 25 08:40:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68e7e76a9be022427e572101cde4e00203c9af46
      https://github.com/llvm/llvm-project/commit/68e7e76a9be022427e572101cde4e00203c9af46
  Author: Joe Loser <joeloser93 at gmail.com>
  Date:   2021-11-25 (Thu, 25 Nov 2021)

  Changed paths:
    M libcxx/include/string_view

  Log Message:
  -----------
  [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




More information about the All-commits mailing list