Skip to content

Commit 9c66612

Browse files
result_of -> invoke_result in pytorch/csprng/torchcsprng/csrc/kernels_body.inc
Summary: `result_of` is eliminated in C++20, so we use `invoke_result` instead Reviewed By: palmje Differential Revision: D57016781 fbshipit-source-id: cf7710d06a052d6d5a741de4e5bb8e56cc63cb0c
1 parent 41aad37 commit 9c66612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchcsprng/csrc/kernels_body.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ at::Tensor key_tensor(size_t block_t_size, c10::optional<at::Generator> generato
1515
std::lock_guard<std::mutex> lock(generator->mutex());
1616
auto gen = at::check_generator<RNG>(generator);
1717
auto key = torch::empty({static_cast<signed long>(block_t_size)}, torch::kUInt8);
18-
using random_t = typename std::result_of<decltype(&RNG::random)(RNG)>::type;
18+
using random_t = typename std::invoke_result_t<decltype(&RNG::random), RNG>;
1919
constexpr size_t random_t_size = sizeof(random_t);
2020
for (size_t i = 0; i < block_t_size / random_t_size; i++) {
2121
const auto rand = gen->random();

0 commit comments

Comments
 (0)