Skip to content

Commit

Permalink
Make it possible to return values from within visitPatch
Browse files Browse the repository at this point in the history
Summary: TSIA

Reviewed By: Mizuchi

Differential Revision: D65847479

fbshipit-source-id: ee76b20017753a374b5f2805458ecbc16250a2e0
  • Loading branch information
Pranav Thulasiram Bhat authored and facebook-github-bot committed Nov 22, 2024
1 parent e249c2f commit bad9437
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thrift/lib/thrift/detail/DynamicPatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,9 @@ class DynamicPatch {

private:
template <class Self, class Visitor>
static void visitPatchImpl(Self&& self, detail::Badge, Visitor&& visitor) {
std::visit(
static decltype(auto) visitPatchImpl(
Self&& self, detail::Badge, Visitor&& visitor) {
return std::visit(
std::forward<Visitor>(visitor), *std::forward<Self>(self).patch_);
}

Expand Down

0 comments on commit bad9437

Please sign in to comment.