Skip to content

Commit

Permalink
Cleanup pluggable_functions doc comment
Browse files Browse the repository at this point in the history
Summary:
* Make the example actually compile.
* Avoid double negation.
* Fix function name.

Reviewed By: aristidisp

Differential Revision: D64725292

fbshipit-source-id: 0276a315ed86fb638806209483cc5dec589ae735
  • Loading branch information
vitaut authored and facebook-github-bot committed Oct 25, 2024
1 parent 0529954 commit 9453cf7
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@
namespace apache::thrift::compiler::detail {

/**
* A simple reimplementation of thrift's PluggableFunction without using
* dependencies banned from the compiler.
* A simple reimplementation of Thrift's PluggableFunction using only
* dependencies allowed in the compiler.
*
* Tag argument must have a static member function `defaultImpl` that is called
* Tag argument must have a static member function `default_impl` that is called
* when the function is not set.
*
* Not thread-safe.
*
* Ex:
* struct MyTag { static void defaultImpl(int) {} };
* Example:
* struct MyTag {
* static void default_impl(int) {}
* };
* pluggable_functions().set<MyTag>(+[](int){});
* pluggable_functions().call<MyTag>(42);
*/
Expand Down

0 comments on commit 9453cf7

Please sign in to comment.