#include <iostream.h>
Public Member Functions | |
scoped_estream_redirect (std::ostream &costream=std::cerr, object pyostream=module::import("sys").attr("stderr")) | |
Public Member Functions inherited from scoped_ostream_redirect | |
scoped_ostream_redirect & | operator= (const scoped_ostream_redirect &)=delete |
scoped_ostream_redirect & | operator= (scoped_ostream_redirect &&)=delete |
scoped_ostream_redirect (std::ostream &costream=std::cout, object pyostream=module::import("sys").attr("stdout")) | |
scoped_ostream_redirect (const scoped_ostream_redirect &)=delete | |
scoped_ostream_redirect (scoped_ostream_redirect &&other)=default | |
~scoped_ostream_redirect () | |
Additional Inherited Members | |
Protected Attributes inherited from scoped_ostream_redirect | |
detail::pythonbuf | buffer |
std::ostream & | costream |
std::streambuf * | old |
Like scoped_ostream_redirect
, but redirects cerr by default. This class is provided primary to make py::call_guard
easier to make.
.. code-block:: cpp
m.def("noisy_func", &noisy_func, py::call_guard<scoped_ostream_redirect, scoped_estream_redirect>());
Definition at line 145 of file iostream.h.
|
inline |
Definition at line 147 of file iostream.h.