Skip to content

Commit

Permalink
Use microsoft rvalue article (#2789)
Browse files Browse the repository at this point in the history
Resolves #2784

Signed-off-by: Jade Turner <[email protected]>
  • Loading branch information
spacey-sooty authored Oct 14, 2024
1 parent 83167ee commit 9c62e98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ While binding to HID buttons is by far the most common use case, users may want

## Trigger Bindings

.. note:: The C++ command-based library offers two overloads of each button binding method - one that takes an [rvalue reference](http://thbecker.net/articles/rvalue_references/section_01.html) (``CommandPtr&&``), and one that takes a raw pointer (``Command*``). The rvalue overload moves ownership to the scheduler, while the raw pointer overload leaves the user responsible for the lifespan of the command object. It is recommended that users preferentially use the rvalue reference overload unless there is a specific need to retain a handle to the command in the calling code.
.. note:: The C++ command-based library offers two overloads of each button binding method - one that takes an [rvalue reference](https://learn.microsoft.com/en-us/cpp/cpp/rvalue-reference-declarator-amp-amp?view=msvc-170) (``CommandPtr&&``), and one that takes a raw pointer (``Command*``). The rvalue overload moves ownership to the scheduler, while the raw pointer overload leaves the user responsible for the lifespan of the command object. It is recommended that users preferentially use the rvalue reference overload unless there is a specific need to retain a handle to the command in the calling code.

There are a number of bindings available for the ``Trigger`` class. All of these bindings will automatically schedule a command when a certain trigger activation event occurs - however, each binding has different specific behavior.

Expand Down

0 comments on commit 9c62e98

Please sign in to comment.