Page MenuHomePhabricator

tcanens (Tim Song)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 4 2016, 2:18 PM (352 w, 3 d)

Recent Activity

Apr 11 2022

tcanens added inline comments to D107500: [libc++][ranges] Implement `lazy_split_view`..
Apr 11 2022, 8:49 AM · Restricted Project, Restricted Project

Apr 10 2022

tcanens added inline comments to D107500: [libc++][ranges] Implement `lazy_split_view`..
Apr 10 2022, 7:32 AM · Restricted Project, Restricted Project

Mar 11 2022

tcanens added inline comments to D121248: [libc++][ranges] Implement ranges::find{, _if, _if_not}.
Mar 11 2022, 5:44 PM · Restricted Project, Restricted Project

Dec 1 2021

tcanens added inline comments to D114761: [libc++][ranges] Implement [special.mem.concepts]..
Dec 1 2021, 8:41 AM · Restricted Project

Nov 14 2021

tcanens added a comment to D113868: [libcxx] Cast to the right `difference_type` in various algorithms.

http://eel.is/c++draft/algorithms.requirements#13

Nov 14 2021, 11:06 PM · Restricted Project
tcanens added inline comments to D113408: [libc++] Implement P0798R8 (Monadic operations for std::optional).
Nov 14 2021, 3:37 PM · Restricted Project
tcanens added inline comments to D113408: [libc++] Implement P0798R8 (Monadic operations for std::optional).
Nov 14 2021, 2:17 PM · Restricted Project

Sep 28 2021

tcanens added inline comments to D110426: [libc++] Add the std::views::reverse range adaptor.
Sep 28 2021, 9:17 PM · Restricted Project

Aug 12 2021

tcanens added inline comments to D107671: [libcxx][ranges] Add `ranges::join_view`..
Aug 12 2021, 5:57 PM · Restricted Project

Aug 11 2021

tcanens added inline comments to D107671: [libcxx][ranges] Add `ranges::join_view`..
Aug 11 2021, 3:55 PM · Restricted Project
tcanens added inline comments to D107671: [libcxx][ranges] Add `ranges::join_view`..
Aug 11 2021, 2:41 PM · Restricted Project

Aug 10 2021

tcanens added inline comments to D107396: [libcxx][ranges] Add `ranges::iota_view`..
Aug 10 2021, 9:46 PM · Restricted Project

Aug 6 2021

tcanens added inline comments to D107671: [libcxx][ranges] Add `ranges::join_view`..
Aug 6 2021, 9:31 PM · Restricted Project

Aug 4 2021

tcanens added inline comments to D107500: [libc++][ranges] Implement `lazy_split_view`..
Aug 4 2021, 11:28 PM · Restricted Project, Restricted Project

Jul 30 2021

tcanens added a comment to D107098: [libc++] Implement the underlying mechanism for range adaptors.

Just a quick note: when P2281R1 talks about perfect forwarding call wrappers, it really means perfect forwarding call wrappers exactly as specified in the standard, that is:

A perfect forwarding call wrapper is an argument forwarding call wrapper that forwards its state entities to the underlying call expression. This forwarding step delivers a state entity of type T as cv T& when the call is performed on an lvalue of the call wrapper type and as cv T&& otherwise, where cv represents the cv-qualifiers of the call wrapper and where cv shall be neither volatile nor const volatile.

In particular, invoking an rvalue wrapper must deliver the state entity as an xvalue and cannot fall back to const lvalue the way __perfect_forward does (without deducing this, I believe that this requires additional deleted operator() overloads). This is particularly significant for split - see the examples in the paper.

Thanks a lot for the heads up. However, I'm not entirely sure I understand where the issue is, because what I'm seeing for __perfect_forward is this (leaving aside noexcept and -> decltype):

template<class... _Args>
constexpr auto operator()(_Args&&... __args) &&
{return _Op::__call(std::get<_Idxs>(std::move(__bound_))..., std::forward<_Args>(__args)...);}

Since we call std::get on std::move(tuple), I think we end up passing rvalue references to __call, don't we? Or did you mean something else?

Jul 30 2021, 10:29 AM · Restricted Project

Jul 29 2021

tcanens added a comment to D107098: [libc++] Implement the underlying mechanism for range adaptors.

Just a quick note: when P2281R1 talks about perfect forwarding call wrappers, it really means perfect forwarding call wrappers exactly as specified in the standard, that is:

Jul 29 2021, 11:15 PM · Restricted Project
tcanens added inline comments to D106923: [libcxx][ranges] Add `views::counted` CPO..
Jul 29 2021, 7:47 AM · Restricted Project

Jul 15 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 15 2021, 3:01 PM · Restricted Project
tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 15 2021, 10:13 AM · Restricted Project
tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 15 2021, 9:26 AM · Restricted Project

Jul 14 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 14 2021, 5:39 PM · Restricted Project
tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 14 2021, 4:36 PM · Restricted Project
tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 14 2021, 11:45 AM · Restricted Project

Jul 13 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 13 2021, 9:55 PM · Restricted Project
tcanens updated subscribers of D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 13 2021, 9:46 PM · Restricted Project
tcanens added inline comments to D105795: [libcxx][algorithms] adds ranges::lower_bound and ranges::upper_bound.
Jul 13 2021, 2:15 PM · Restricted Project
tcanens added inline comments to D105795: [libcxx][algorithms] adds ranges::lower_bound and ranges::upper_bound.
Jul 13 2021, 12:51 PM · Restricted Project

Jul 12 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 12 2021, 12:51 PM · Restricted Project

Jul 8 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
Jul 8 2021, 5:34 PM · Restricted Project
tcanens added inline comments to D105456: [libcxx][algorithms] adds `std::ranges::find`.
Jul 8 2021, 9:51 AM · Restricted Project

Jul 7 2021

tcanens added inline comments to D105456: [libcxx][algorithms] adds `std::ranges::find`.
Jul 7 2021, 8:51 PM · Restricted Project
tcanens added inline comments to D105456: [libcxx][algorithms] adds `std::ranges::find`.
Jul 7 2021, 8:44 PM · Restricted Project

Jul 6 2021

tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 6 2021, 11:54 AM · Restricted Project

Jul 2 2021

tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 2 2021, 12:43 PM · Restricted Project
tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 2 2021, 8:19 AM · Restricted Project

Jul 1 2021

tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 1 2021, 9:17 PM · Restricted Project
tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 1 2021, 9:08 PM · Restricted Project
tcanens added inline comments to D103056: [libcxx][ranges] Add `ranges::transform_view`..
Jul 1 2021, 12:42 PM · Restricted Project
tcanens added inline comments to D102135: [libcxx][ranges] adds _`copyable-box`_.
Jul 1 2021, 12:41 PM · Restricted Project

Jun 30 2021

tcanens added inline comments to D105205: [libcxx][ranges] implements dangling, borrowed_iterator_t, borrowed_subrange_t.
Jun 30 2021, 2:06 PM · Restricted Project
tcanens added inline comments to D103056: [libcxx][ranges] Add `ranges::transform_view`..
Jun 30 2021, 7:01 AM · Restricted Project

Jun 29 2021

tcanens added inline comments to D103056: [libcxx][ranges] Add `ranges::transform_view`..
Jun 29 2021, 8:09 PM · Restricted Project

Jun 24 2021

tcanens added a comment to D102135: [libcxx][ranges] adds _`copyable-box`_.

At first, I didn't understand the purpose of this type. Now I think I do - it's to turn something that is copy-constructible (but maybe not copy assignable) into something that is both copy-constructible and copy-assignable. It does that by using an optional and basically doing destroy-then-copy-construct in the assignment operator.

Jun 24 2021, 8:21 AM · Restricted Project

Jun 23 2021

tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
Jun 23 2021, 8:59 AM · Restricted Project

Jun 22 2021

tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
Jun 22 2021, 1:27 PM · Restricted Project
tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
Jun 22 2021, 10:18 AM · Restricted Project

Jun 21 2021

tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
Jun 21 2021, 5:13 PM · Restricted Project

Jun 9 2021

tcanens added inline comments to D102020: [libcxx][ranges] Add class ref_view..
Jun 9 2021, 8:26 PM · Restricted Project

Jun 3 2021

tcanens added a comment to D103478: [libc++][compare] Implement three_way_comparable[_with] concepts.

I was looking at how to implement compare_three_way and found out that it needs to be present in both <compare> and <functional> according to the standard draft ( <function> synopsis, <compare> synopsis).

Sounds like someone should file an LWG issue. I'm not aware of any other library facilities that are listed multiple times in different places in the Standard. This might be a cut-and-paste error.

Jun 3 2021, 5:34 PM · Restricted Project
tcanens added inline comments to D102020: [libcxx][ranges] Add class ref_view..
Jun 3 2021, 5:28 PM · Restricted Project
tcanens added inline comments to D103493: [libcxx][ranges] Add concepts in range.utility.helpers..
Jun 3 2021, 5:25 PM · Restricted Project

May 28 2021

tcanens added inline comments to D103335: [libcxx][ranges] Adds `common_iterator`..
May 28 2021, 9:14 PM · Restricted Project

May 20 2021

tcanens added inline comments to D102006: [libcxx][ranges] Add range.subrange..
May 20 2021, 2:59 PM · Restricted Project

May 19 2021

tcanens added inline comments to D102809: [libcxx][ranges] Add `ranges::iter_swap`..
May 19 2021, 5:04 PM · Restricted Project

May 16 2021

tcanens added inline comments to D102119: [libcxx][optional] adds missing constexpr operations.
May 16 2021, 9:52 PM · Restricted Project

May 11 2021

tcanens added inline comments to D102028: [libcxx][ranges] Implement views::all..
May 11 2021, 5:00 PM · Restricted Project

May 10 2021

tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
May 10 2021, 9:46 AM · Restricted Project

May 8 2021

tcanens added inline comments to D102121: [libcxx][ranges] adds _`non-propagating-cache`_.
May 8 2021, 7:07 PM · Restricted Project
tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
May 8 2021, 12:32 PM · Restricted Project
tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
May 8 2021, 5:01 AM · Restricted Project

May 7 2021

tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
May 7 2021, 4:06 PM · Restricted Project
tcanens added a comment to D101948: [libc++] Future-proof std::copy for ranges.

I think something like remove or rotate (and more generally algorithms that require the use of the new iter_move and iter_swap customization points) might be a more interesting exercise.

May 7 2021, 3:48 PM · Restricted Project
tcanens added inline comments to D102028: [libcxx][ranges] Implement views::all..
May 7 2021, 3:42 PM · Restricted Project
tcanens added inline comments to D102037: [libcxx][views] Add drop_view..
May 7 2021, 3:41 PM · Restricted Project

May 6 2021

tcanens added inline comments to D101193: [libcxx][ranges] Add ranges::empty CPO..
May 6 2021, 4:14 PM · Restricted Project
tcanens added inline comments to D101193: [libcxx][ranges] Add ranges::empty CPO..
May 6 2021, 3:31 PM · Restricted Project

May 5 2021

tcanens added inline comments to D101729: [libcxx] deprecates `std::iterator` and removes it as a base class.
May 5 2021, 8:22 AM · Restricted Project

May 2 2021

tcanens added inline comments to D101737: [libcxx] Implement view.interface..
May 2 2021, 9:41 PM · Restricted Project

May 1 2021

tcanens added a comment to D101708: [libcxx] modifies `_CmpUnspecifiedParam` ignore types outside its domain.

rejected both nullptr_t ([cmp.categories]/p3 notes that "nullptr_t meets this requirement" at the end of the paragraph)

May 1 2021, 10:13 PM · Restricted Project

Apr 29 2021

tcanens added inline comments to D101404: [libc++] Comment preconditions for __wrap_iter; make it work with C++20 to_address.
Apr 29 2021, 11:15 AM · Restricted Project
tcanens added inline comments to D101547: [libc++] Implement ranges::view.
Apr 29 2021, 11:06 AM · Restricted Project
tcanens added inline comments to D101404: [libc++] Comment preconditions for __wrap_iter; make it work with C++20 to_address.
Apr 29 2021, 5:09 AM · Restricted Project

Apr 24 2021

tcanens added a comment to D100255: [libcxx][ranges] adds `range` access CPOs.

The array-of-incomplete-element case is IFNDR. I think we really want that case to be a SFINAE-unfriendly hard error, since it's a recipe for disaster (ODR violations).

Won't the deleted overloads take care of that?

Apr 24 2021, 10:17 AM · Restricted Project

Apr 23 2021

tcanens added a comment to D100255: [libcxx][ranges] adds `range` access CPOs.

The array-of-incomplete-element case is IFNDR. I think we really want that case to be a SFINAE-unfriendly hard error, since it's a recipe for disaster (ODR violations).

Apr 23 2021, 4:04 PM · Restricted Project
tcanens updated subscribers of D101193: [libcxx][ranges] Add ranges::empty CPO..
Apr 23 2021, 3:59 PM · Restricted Project

Apr 21 2021

tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 21 2021, 6:52 AM · Restricted Project

Apr 20 2021

tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 20 2021, 4:13 PM · Restricted Project
tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 20 2021, 3:37 PM · Restricted Project

Apr 17 2021

tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 17 2021, 11:07 PM · Restricted Project
tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 17 2021, 10:55 PM · Restricted Project
tcanens added inline comments to D100429: [libc++][ranges] Add range.cmp: equal_to, not_equal_to, less, etc..
Apr 17 2021, 8:45 PM · Restricted Project
tcanens added inline comments to D99873: [libcxx] adds `std::ranges::iter_move` and `std::iter_rvalue_reference_t`.
Apr 17 2021, 8:33 PM · Restricted Project

Apr 11 2021

tcanens added inline comments to D100255: [libcxx][ranges] adds `range` access CPOs.
Apr 11 2021, 11:07 AM · Restricted Project

Apr 7 2021

tcanens added inline comments to D99461: [libcxx] adds `std::indirectly_readable_traits` to <iterator>.
Apr 7 2021, 7:57 PM · Restricted Project
tcanens added inline comments to D99461: [libcxx] adds `std::indirectly_readable_traits` to <iterator>.
Apr 7 2021, 7:19 PM · Restricted Project
tcanens added inline comments to D99863: [libcxx] adds `iter_difference_t` and `iter_value_t`.
Apr 7 2021, 7:02 PM · Restricted Project
tcanens added inline comments to D99855: [libcxx] makes `iterator_traits` C++20-aware.
Apr 7 2021, 6:51 PM · Restricted Project
tcanens added inline comments to D99854: [libcxx] adds `cpp17-.*iterator` concepts for iterator_traits.
Apr 7 2021, 6:34 PM · Restricted Project
tcanens added inline comments to D99873: [libcxx] adds `std::ranges::iter_move` and `std::iter_rvalue_reference_t`.
Apr 7 2021, 6:24 PM · Restricted Project

Mar 21 2021

tcanens added a comment to D99041: [libcxx] moves `std::invoke` into `__functional_base`.

The exact expression in an atomic constraint is not observable so you can certainly substitute something else if that is preferable for whatever reason.

Mar 21 2021, 4:38 PM · Restricted Project

Mar 14 2021

tcanens added a comment to D98573: [libc++] Remove the special logic for "noexcept iterators" in basic_string.

For append, we can always use the optimized approach, because if an iterator operation throws, we just restore the null terminator and we're back where we started, no problem.

Mar 14 2021, 5:32 PM · Restricted Project

Mar 4 2021

tcanens added inline comments to D97394: [libc++] [C++2b] [P2162] Allow inheritance from std::variant..
Mar 4 2021, 12:53 PM · Restricted Project

Mar 3 2021

tcanens added inline comments to D97162: [libcxx] adds std::ranges::swap, std::swappable, and std::swappable_with.
Mar 3 2021, 7:17 PM · Restricted Project

Mar 2 2021

tcanens added inline comments to D97394: [libc++] [C++2b] [P2162] Allow inheritance from std::variant..
Mar 2 2021, 9:35 PM · Restricted Project

Dec 8 2020

tcanens added a comment to D91292: [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library..

LWG doesn't do official DRs like ever,

I'm not sure I follow. Aren't all LWG issues considered DRs and "back applied" to earlier standards, hence what we do in the libraries wrt LWG issues?

Dec 8 2020, 10:13 AM · Restricted Project
tcanens added a comment to D91292: [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library..

I removed the unnecessary check for > C++11 in make_implicit, but that doesn't change a lot as it's used anyway only in C++20.
Anyway, I've just seen that P0935 has been adopted as a DR applied retroactively to previous standards down to C++11. My only source tho is https://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution/uniform_real_distribution.
Should I apply it to pre-C++20 then?

It was adopted as a paper, and it does *not* appear to have been voted as a DR. I found on the Rapperswill (2018) wiki motion page:

Motion 25
Move to apply to the C++ working paper the proposed wording in P0935R0 (Eradicating unnecessarily explicit default constructors from the standard library).

It doesn't appear to be applied as a DR, however the author himself was the one to change cppreference (looking at the history). @tcanens Do you have more context?

Dec 8 2020, 9:15 AM · Restricted Project

Apr 1 2020

tcanens added a comment to D67900: [libc++] Use builtin type traits whenever possible.

@tcanens I didn't look closely enough at the error. It looks like it's because vector uses numeric limits. I'll revert the changes which will fix the problem so, don't worry about it :)

Apr 1 2020, 12:57 PM · Restricted Project

Jul 13 2018

tcanens added a comment to D38075: Fix PR34668 - P0704R1 implementation is too permissive.

Do you need someone to commit it?

Jul 13 2018, 9:09 AM · Restricted Project

Jun 28 2018

tcanens added inline comments to D48616: Implement LWG 2946, 3075 and 3076.
Jun 28 2018, 12:55 PM

Feb 26 2018

tcanens added a comment to D43773: Implement the container bits of P0805R1.

Hmm, for vector and deque, we define a temporary variable, check that sizes match and then use range-and-a-half equal:

Feb 26 2018, 1:10 PM