1. Sep 20, 2016
  2. Sep 19, 2016
  3. Sep 17, 2016
  4. Sep 16, 2016
    • Jason Rhinelander's avatar
      Added py::register_exception for simple case (#296) · b3794f10
      Jason Rhinelander authored
      The custom exception handling added in PR #273 is robust, but is overly
      complex for declaring the most common simple C++ -> Python exception
      mapping that needs only to copy `what()`.  This add a simpler
      `py::register_exception<CppExp>(module, "PyExp");` function that greatly
      simplifies the common basic case of translation of a simple CppException
      into a simple PythonException, while not removing the more advanced
      capabilities of defining custom exception handlers.
      b3794f10
  5. Sep 13, 2016
  6. Sep 12, 2016
  7. Sep 11, 2016
  8. Sep 10, 2016
  9. Sep 09, 2016
    • Jason Rhinelander's avatar
      Implement py::init_alias<>() constructors · ec62d977
      Jason Rhinelander authored
      This commit adds support for forcing alias type initialization by
      defining constructors with `py::init_alias<arg1, arg2>()` instead of
      `py::init<arg1, arg2>()`.  Currently py::init<> only results in Alias
      initialization if the type is extended in python, or the given
      arguments can't be used to construct the base type, but can be used to
      construct the alias.  py::init_alias<>, in contrast, always invokes the
      constructor of the alias type.
      
      It looks like this was already the intention of
      `py::detail::init_alias`, which was forward-declared in
      86d825f3, but was apparently never
      finished: despite the existance of a .def method accepting it, the
      `detail::init_alias` class isn't actually defined anywhere.
      
      This commit completes the feature (or possibly repurposes it), allowing
      declaration of classes that will always initialize the trampoline which
      is (as I argued in #397) sometimes useful.
      ec62d977
    • Wenzel Jakob's avatar
      Merge pull request #401 from jagerman/templates-simplification · 356bf94a
      Wenzel Jakob authored
      Small template simplifications
      356bf94a
    • Jason Rhinelander's avatar
      Template simplifications · 5aa2cd5e
      Jason Rhinelander authored
      Switch count_t to use constexpr_sum (under non-MSVC), and then make
      all_of_t/any_of_t use it instead of doing the sum itself.
      
      For MSVC, count_t is still done using template recursion, but
      all_of_t/any_of_t can also make use of it.
      5aa2cd5e
  10. Sep 08, 2016