pybind11/docs/advanced/cast
Tim Ohliger 1b7aa0bb66
feat: rework of arg/return type hints to support .noconvert() (#5486)
* Added rework of arg/return typing

* Changed `Path` to `pathlib.Path` for compatibility with pybind11-stubgen

* Removed old arg/return type hint implementation

* Added noconvert support for arg/return type hints

* Added commented failing tests for Literals with special characters

* Added return_descr/arg_descr for correct typing in typing::Callable

* Fixed clang-tidy issues

* Changed io_name to have explicit return type (for C++11 support)

* style: pre-commit fixes

* Added support for nested callables

* Fixed missing include

* Fixed is_return_value constructor call

* Fixed clang-tidy issue

* Uncommented test cases for special characters in literals

* Moved literal tests to correct test case

* Added escaping of special characters in typing::Literal

* Readded mistakenly deleted bracket

* Moved sanitize_string_literal to correct namespace

* Added test for Literal with `!` and changed StringLiteral template param name

* Added test for Literal with multiple and repeated special chars

* Simplified string literal sanitization function

* Added test for `->` in literal

* Added test for `->` with io_name

* Removed unused parameter name to prevent warning

* Added escaping of `-` in literal to prevent processing of `->`

* Fixed wrong computation of sanitized string literal length

* Added cast to prevent error with MSVC

* Simplified special character check

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-24 17:01:06 -05:00
..
chrono.rst Added ability to convert from datetime.date to system_clock::time_point (#1848) 2019-07-19 11:28:48 +02:00
custom.rst feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
eigen.rst chore: remove repetitive words (#5308) 2024-08-13 22:04:10 -07:00
functional.rst Replace PYBIND11_PLUGIN with PYBIND11_MODULE 2017-05-29 03:21:19 +02:00
index.rst feat: py::type::of<T>() and py::type::of(h) (#2364) 2020-09-14 18:06:26 -04:00
overview.rst Option for arg/return type hints and correct typing for std::filesystem::path (#5450) 2024-12-08 11:30:49 -08:00
stl.rst fix: allow -Wpedantic in C++20 mode (#5322) 2024-08-22 00:27:50 -04:00
strings.rst Update errors in string "Explicit conversions" docs (#4658) 2023-05-09 07:04:20 -07:00