Skip to content

Commit bacd93a

Browse files
committed
[ci-skip] update resolve docs
1 parent 77a7bf1 commit bacd93a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/source/api/resolve.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ utility to pick overloaded C++ function calls
1919
int overloaded(int x, int y, int z);
2020
2121
struct thing {
22+
int overloaded() const;
2223
int overloaded(int x);
2324
int overloaded(int x, int y);
2425
int overloaded(int x, int y, int z);
@@ -33,8 +34,9 @@ You can disambiguate them using ``resolve``:
3334
auto two_argument_func = resolve<int(int, int)>( overloaded );
3435
auto three_argument_func = resolve<int(int, int, int)>( overloaded );
3536
auto member_three_argument_func = resolve<int(int, int, int)>( &thing::overloaded );
37+
auto member_zero_argument_const_func = resolve<int() const>( &thing::overloaded );
3638
37-
This resolution becomes useful when setting functions on a :doc:`table<table>` or :doc:`state_view<state>`:
39+
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>`:
3840

3941
.. code-block:: cpp
4042
:linenos:

0 commit comments

Comments
 (0)