summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-domain-cpp/operator-lookup.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
commit5bb0bb4be543fd5eca41673696a62ed80d493591 (patch)
treead2c464f140e86c7f178a6276d7ea4a93e3e6c92 /tests/roots/test-domain-cpp/operator-lookup.rst
parentAdding upstream version 7.2.6. (diff)
downloadsphinx-upstream/7.3.7.tar.xz
sphinx-upstream/7.3.7.zip
Adding upstream version 7.3.7.upstream/7.3.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-domain-cpp/operator-lookup.rst')
-rw-r--r--tests/roots/test-domain-cpp/operator-lookup.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/roots/test-domain-cpp/operator-lookup.rst b/tests/roots/test-domain-cpp/operator-lookup.rst
new file mode 100644
index 0000000..671b91b
--- /dev/null
+++ b/tests/roots/test-domain-cpp/operator-lookup.rst
@@ -0,0 +1,28 @@
+When doing name resolution there are 4 different idenOrOps:
+
+- identifier
+- built-in operator
+- user-defined literal
+- type conversion
+
+.. cpp:function:: int g()
+.. cpp:function:: int operator+(int, int)
+.. cpp:function:: int operator""_lit()
+
+.. cpp:class:: B
+
+ .. cpp:function:: operator int()
+
+ Functions that can't be found:
+
+ - :cpp:func:`int h()`
+ - :cpp:func:`int operator+(bool, bool)`
+ - :cpp:func:`int operator""_udl()`
+ - :cpp:func:`operator bool()`
+
+ Functions that should be found:
+
+ - :cpp:func:`int g()`
+ - :cpp:func:`int operator+(int, int)`
+ - :cpp:func:`int operator""_lit()`
+ - :cpp:func:`operator int()`