From ac096aa2a0921efde96b76252dffb119dcf27efc Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 5 Feb 2017 16:01:50 +0100 Subject: Update sol2 (nw) --- 3rdparty/sol2/docs/source/api/resolve.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '3rdparty/sol2/docs/source/api/resolve.rst') 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( overloaded ); auto three_argument_func = resolve( overloaded ); auto member_three_argument_func = resolve( &thing::overloaded ); + auto member_zero_argument_const_func = resolve( &thing::overloaded ); -This resolution becomes useful when setting functions on a :doc:`table` or :doc:`state_view`: +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
` or :doc:`state_view`: .. code-block:: cpp :linenos: -- cgit v1.2.3-70-g09d2