[all-commits] [llvm/llvm-project] c10865: [libc++][ranges] P2387R3: Pipe support for user-de...

Xiaoyang Liu via All-commits all-commits at lists.llvm.org
Tue Apr 23 07:58:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1086532d4d5c0a261457dfb00e79fcb764e3d78
      https://github.com/llvm/llvm-project/commit/c1086532d4d5c0a261457dfb00e79fcb764e3d78
  Author: Xiaoyang Liu <siujoeng.lau at gmail.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M libcxx/docs/ReleaseNotes/19.rst
    M libcxx/docs/Status/Cxx23.rst
    M libcxx/docs/Status/Cxx23Papers.csv
    M libcxx/docs/Status/RangesMajorFeatures.csv
    M libcxx/include/__ranges/range_adaptor.h
    M libcxx/include/ranges
    A libcxx/test/std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp

  Log Message:
  -----------
  [libc++][ranges] P2387R3: Pipe support for user-defined range adaptors (#89148)

This patch finalizes the std::ranges::range_adaptor_closure
class template from https://wg21.link/P2387R3.

  // [range.adaptor.object], range adaptor objects
  template<class D>
    requires is_class_v<D> && same_as<D, remove_cv_t<D>>
  class range_adaptor_closure { };

The current implementation of __range_adaptor_closure was introduced
in ee44dd8062a26541808fc0d3fd5c6703e19f6016 and has served as the
foundation for the range adaptors in libc++ for a while. This patch
keeps its implementation, with the exception of the following changes:

- __range_adaptor_closure now includes the missing constraints
  `is_class_v<D> && same_as<D, remove_cv_t<D>>` to restrict the 
  type of class that can inherit from it. (https://eel.is/c++draft/ranges.syn)
- The operator| of __range_adaptor_closure no longer requires its
  first argument to model viewable_range. (https://eel.is/c++draft/range.adaptor.object#1)
- The _RangeAdaptorClosure concept is refined to exclude cases where
  T models range or where T has base classes of type range_adaptor_closure<U>
  for another type U. (https://eel.is/c++draft/range.adaptor.object#2)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list