[all-commits] [llvm/llvm-project] f824bb: [pstl] Fix incorrect usage of std::invoke_result

Ruslan Arutyunyan via All-commits all-commits at lists.llvm.org
Fri Nov 26 06:32:01 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f824bb0e36fc7099923f583e4eea4aaa7d296957
      https://github.com/llvm/llvm-project/commit/f824bb0e36fc7099923f583e4eea4aaa7d296957
  Author: Ruslan Arutyunyan <ruslan.arutyunyan at intel.com>
  Date:   2021-11-26 (Fri, 26 Nov 2021)

  Changed paths:
    M pstl/include/pstl/internal/utils.h

  Log Message:
  -----------
  [pstl] Fix incorrect usage of std::invoke_result

std::invoke_result takes function object type and arguments separately
(unlike std::result_of) so, std::invoke_result_t<F()> usage is
incorrect.

On the other hand, we don't need std::invoke() semantics here at all. So
just simplifying the code without extra dependency and use trailing
return type as the fix.

Reviewed By: MikeDvorskiy

Differential Revision: https://reviews.llvm.org/D114624




More information about the All-commits mailing list