mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix documentation derp
This commit is contained in:
parent
63b9f748f7
commit
2166906343
|
@ -48,10 +48,6 @@ These functions retrieve items from the table. The first one (``get``) can pull
|
|||
|
||||
If the keys within nested queries try to traverse into a table that doesn't exist, the second lookup into the nil-returned variable and belong will cause a panic to be fired by the lua C API. If you need to check for keys, check with ``auto x = table.get<sol::optional<int>>( std::tie("a", "b", "c" ) );``, and then use the :doc:`optional<optional>` interface to check for errors. As a short-hand, easy method for returning a default if a value doesn't exist, you can use ``get_or`` instead.
|
||||
|
||||
.. note::
|
||||
|
||||
Value semantics are applied to all set operations. If you do not ``std::ref( obj )`` or specifically make a pointer with ``std::addressof( obj )`` or ``&obj``, it will copy / move. This is different from how :doc:`sol::function<function>` behaves with its call operator.
|
||||
|
||||
.. code-block:: cpp
|
||||
:caption: function: set / traversing set
|
||||
|
||||
|
@ -67,7 +63,6 @@ These functions set items into the table. The first one (``set``) can set *mult
|
|||
|
||||
Value semantics are applied to all set operations. If you do not ``std::ref( obj )`` or specifically make a pointer with ``std::addressof( obj )`` or ``&obj``, it will copy / move. This is different from how :doc:`sol::function<function>` behaves with its call operator.
|
||||
|
||||
|
||||
.. code-block:: cpp
|
||||
:caption: function: add
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user