pybind11/include/pybind11
Jason Rhinelander 3f1ff3f4d1 Adds automatic casting on assignment of non-pyobject types (#551)
This adds automatic casting when assigning to python types like dict,
list, and attributes.  Instead of:

    dict["key"] = py::cast(val);
    m.attr("foo") = py::cast(true);
    list.append(py::cast(42));

you can now simply write:

    dict["key"] = val;
    m.attr("foo") = true;
    list.append(42);

Casts needing extra parameters (e.g. for a non-default rvp) still
require the py::cast() call. set::add() is also supported.

All usage is channeled through a SFINAE implementation which either just returns or casts. 

Combined non-converting handle and autocasting template methods via a
helper method that either just returns (handle) or casts (C++ type).
2016-12-12 23:42:52 +01:00
..
attr.h added forgotten initialization 2016-11-20 05:41:38 +01:00
cast.h Adds automatic casting on assignment of non-pyobject types (#551) 2016-12-12 23:42:52 +01:00
chrono.h Simplify redundant code, conform to style suggestions, improve logic 2016-09-28 01:01:44 +10:00
common.h Add syntax sugar for resolving overloaded functions (#541) 2016-12-08 11:07:52 +01:00
complex.h nicer type_caster::load() calling conventions 2016-05-15 20:23:27 +02:00
descr.h std::valarray support for stl.h (#545) 2016-12-08 00:43:29 +01:00
eigen.h Improve consistency of array and array_t with regard to other pytypes 2016-11-17 08:55:42 +01:00
eval.h Add py::reinterpret_borrow<T>()/steal<T>() for low-level unchecked casts 2016-11-17 08:55:42 +01:00
functional.h Split up tuple caster and function argument loader 2016-12-03 23:13:53 +01:00
numpy.h Use C++14 index_sequence when possible 2016-12-03 23:13:53 +01:00
operators.h Multiple inheritance support 2016-09-19 13:45:31 +02:00
options.h Provide more control over automatic generation of docstrings (#486) 2016-11-15 12:38:05 +01:00
pybind11.h Allow references to objects held by smart pointers (#533) 2016-12-07 02:36:44 +01:00
pytypes.h Adds automatic casting on assignment of non-pyobject types (#551) 2016-12-12 23:42:52 +01:00
stl_bind.h Fix stl_bind to support movable, non-copyable value types (#490) 2016-11-15 12:30:38 +01:00
stl.h std::valarray support for stl.h (#545) 2016-12-08 00:43:29 +01:00
typeid.h minor cleanups in common.h; updated author info and copyright year 2016-04-18 10:53:38 +02:00