aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-27 12:16:35 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-03-17 15:37:11 +0100
commit5050c23996b4bfe73a9c7e5706c5bf82617fde05 (patch)
treed35b6a2790d1ea704fcbf6559698416d0ff7ca93 /sources
parentff581a0d2a7396de69389754e3d0f69ea104dea5 (diff)
shiboken6: Add documentation note about passing spans
Task-number: PYSIDE-2174 Change-Id: Ife25a012737b5abc2f44e55a1fbcd5e16e389af0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken6/doc/typesystem_containers.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/sources/shiboken6/doc/typesystem_containers.rst b/sources/shiboken6/doc/typesystem_containers.rst
index ffcae88a1..1aa234fa3 100644
--- a/sources/shiboken6/doc/typesystem_containers.rst
+++ b/sources/shiboken6/doc/typesystem_containers.rst
@@ -71,6 +71,15 @@ the STL and the Qt naming convention (which resembles Python's) are supported:
| | the memory. |
+-------------------------------------------+-----------------------------------+
+
+.. note:: ``std::span``, being a non-owning container, is currently replaced by a
+ ``std::vector`` for argument passing. This means that an opaque container
+ wrapping a ``std::span`` obtained from a function will be converted
+ to a ``std::vector`` by sequence conversion when passed to a function
+ taking a ``std::span``.
+ Opaque containers wrapping a ``std::vector`` can be passed without conversion.
+ This is currently experimental and subject to change.
+
Following is an example on creating an opaque container named ``IntVector``
from `std::vector<int>`, and using it in Python.