summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/sol2/docs/source/api/resolve.rst
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:01:50 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:06:06 +0100
commitac096aa2a0921efde96b76252dffb119dcf27efc (patch)
tree2ad9a28a7f6babce8cfcbf5995e3e055ff13ff60 /3rdparty/sol2/docs/source/api/resolve.rst
parent29df715138452ee18ba19ec4b07e18c4b3185de7 (diff)
Update sol2 (nw)
Diffstat (limited to '3rdparty/sol2/docs/source/api/resolve.rst')
-rw-r--r--3rdparty/sol2/docs/source/api/resolve.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/3rdparty/sol2/docs/source/api/resolve.rst b/3rdparty/sol2/docs/source/api/resolve.rst
index 193e2fae80f..b1ceffd0134 100644
--- a/3rdparty/sol2/docs/source/api/resolve.rst
+++ b/3rdparty/sol2/docs/source/api/resolve.rst
@@ -19,6 +19,7 @@ utility to pick overloaded C++ function calls
int overloaded(int x, int y, int z);
struct thing {
+ int overloaded() const;
int overloaded(int x);
int overloaded(int x, int y);
int overloaded(int x, int y, int z);
@@ -33,8 +34,9 @@ You can disambiguate them using ``resolve``:
auto two_argument_func = resolve<int(int, int)>( overloaded );
auto three_argument_func = resolve<int(int, int, int)>( overloaded );
auto member_three_argument_func = resolve<int(int, int, int)>( &thing::overloaded );
+ auto member_zero_argument_const_func = resolve<int() const>( &thing::overloaded );
-This resolution becomes useful when setting functions on a :doc:`table<table>` or :doc:`state_view<state>`:
+It is *important* to note that ``const`` is placed at the end for when you desire const overloads. You will get compiler errors if you are not specific and do not properly disambiguate for const member functions. This resolution also becomes useful when setting functions on a :doc:`table<table>` or :doc:`state_view<state>`:
.. code-block:: cpp
:linenos: