pybind11/docs
Jason Rhinelander f7f5bc8e37 Numpy: better compilation errors, long double support (#619)
* Clarify PYBIND11_NUMPY_DTYPE documentation

The current documentation and example reads as though
PYBIND11_NUMPY_DTYPE is a declarative macro along the same lines as
PYBIND11_DECLARE_HOLDER_TYPE, but it isn't.  The changes the
documentation and docs example to make it clear that you need to "call"
the macro.

* Add satisfies_{all,any,none}_of<T, Preds>

`satisfies_all_of<T, Pred1, Pred2, Pred3>` is a nice legibility-enhanced
shortcut for `is_all<Pred1<T>, Pred2<T>, Pred3<T>>`.

* Give better error message for non-POD dtype attempts

If you try to use a non-POD data type, you get difficult-to-interpret
compilation errors (about ::name() not being a member of an internal
pybind11 struct, among others), for which isn't at all obvious what the
problem is.

This adds a static_assert for such cases.

It also changes the base case from an empty struct to the is_pod_struct
case by no longer using `enable_if<is_pod_struct>` but instead using a
static_assert: thus specializations avoid the base class, POD types
work, and non-POD types (and unimplemented POD types like std::array)
get a more informative static_assert failure.

* Prefix macros with PYBIND11_

numpy.h uses unprefixed macros, which seems undesirable.  This prefixes
them with PYBIND11_ to match all the other macros in numpy.h (and
elsewhere).

* Add long double support

This adds long double and std::complex<long double> support for numpy
arrays.

This allows some simplification of the code used to generate format
descriptors; the new code uses fewer macros, instead putting the code as
different templated options; the template conditions end up simpler with
this because we are now supporting all basic C++ arithmetic types (and
so can use is_arithmetic instead of is_integral + multiple
different specializations).

In addition to testing that it is indeed working in the test script, it
also adds various offset and size calculations there, which
fixes the test failures under x86 compilations.
2017-01-31 17:00:15 +01:00
..
_static documentation improvements 2016-04-26 23:48:55 +02:00
advanced Numpy: better compilation errors, long double support (#619) 2017-01-31 17:00:15 +01:00
basics.rst Change compilation/test target back to check (#566) 2016-12-19 17:33:02 +01:00
benchmark.py Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
benchmark.rst ..mention in benchmark docs as well 2016-08-19 09:38:14 +02:00
changelog.rst use -x flag to strip shared libraries on OSX (fixes #595) 2017-01-06 14:20:26 +01:00
classes.rst Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
compiling.rst reference binder project from documentation 2016-12-26 13:54:50 +01:00
conf.py Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
Doxyfile Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
environment.yml Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
faq.rst add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00
index.rst Reorganize documentation 2016-10-20 15:21:34 +02:00
intro.rst Make non-ancient version of GCC explicit in documentation (it means 4.8+) (#575) 2016-12-28 12:10:11 +01:00
limitations.rst Multiple inheritance support 2016-09-19 13:45:31 +02:00
Makefile took a stab at some documentation 2015-10-13 03:16:44 +02:00
pybind11_vs_boost_python1.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python1.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11_vs_boost_python2.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python2.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11-logo.png Very minor documentation fixes, updated logo 2016-01-17 22:31:15 +01:00
reference.rst Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
release.rst minor setup.py updates 2017-01-01 17:14:27 +01:00