mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-12 17:26:13 +00:00
style: add clang-format file (#2310)
* style: adding clang-format as manual hook * docs: adding a Clang-Format section. (#2803) Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
This commit is contained in:
@@ -104,8 +104,10 @@ PYBIND11_NAMESPACE_END(detail)
|
||||
.. code-block:: cpp
|
||||
|
||||
{
|
||||
py::scoped_ostream_redirect output{std::cerr, py::module_::import("sys").attr("stderr")};
|
||||
std::cerr << "Hello, World!";
|
||||
py::scoped_ostream_redirect output{
|
||||
std::cerr,
|
||||
py::module::import("sys").attr("stderr")
|
||||
};
|
||||
}
|
||||
\endrst */
|
||||
class scoped_ostream_redirect {
|
||||
|
||||
Reference in New Issue
Block a user