Commit 217a93e7 authored by da-woods's avatar da-woods Committed by GitHub

Document some additional C++ auto-conversions (GH-4090)

parent 18970d35
...@@ -331,19 +331,27 @@ arguments) or by an explicit cast, e.g.: ...@@ -331,19 +331,27 @@ arguments) or by an explicit cast, e.g.:
The following coercions are available: The following coercions are available:
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| Python type => | *C++ type* | => Python type | | Python type => | *C++ type* | => Python type |
+==================+================+=================+ +==================+========================+=================+
| bytes | std::string | bytes | | bytes | std::string | bytes |
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| iterable | std::vector | list | | iterable | std::vector | list |
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| iterable | std::list | list | | iterable | std::list | list |
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| iterable | std::set | set | | iterable | std::set | set |
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| iterable (len 2) | std::pair | tuple (len 2) | | iterable | std::unordered_set | set |
+------------------+----------------+-----------------+ +------------------+------------------------+-----------------+
| mapping | std::map | dict |
+------------------+------------------------+-----------------+
| mapping | std::unordered_map | dict |
+------------------+------------------------+-----------------+
| iterable (len 2) | std::pair | tuple (len 2) |
+------------------+------------------------+-----------------+
| complex | std::complex | complex |
+------------------+------------------------+-----------------+
All conversions create a new container and copy the data into it. All conversions create a new container and copy the data into it.
The items in the containers are converted to a corresponding type The items in the containers are converted to a corresponding type
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment