1. 13 Dec, 2016 5 commits
  2. 12 Dec, 2016 4 commits
  3. 11 Dec, 2016 1 commit
  4. 09 Dec, 2016 1 commit
  5. 08 Dec, 2016 1 commit
  6. 07 Dec, 2016 2 commits
    • Jason Rhinelander's avatar
      std::valarray support for stl.h (#545) · ae185b7f
      Jason Rhinelander authored
      * Added ternary support with descr args
      
      Current the `_<bool>(a, b)` ternary support only works for `char[]` `a`
      and `b`; this commit allows it to work for `descr` `a` and `b` arguments
      as well.
      
      * Add support for std::valarray to stl.h
      
      This abstracts the std::array into a `array_caster` which can then be
      used with either std::array or std::valarray, the main difference being
      that std::valarray is resizable.  (It also lets the array_caster be
      potentially used for other std::array-like interfaces, much as the
      list_caster and map_caster currently provide).
      
      * Small stl.h cleanups
      
      - Remove redundant `type` typedefs
      - make internal list_caster methods private
      ae185b7f
    • Dean Moldovan's avatar
  7. 03 Dec, 2016 3 commits
    • Dean Moldovan's avatar
      Use C++14 index_sequence when possible · 8c85a857
      Dean Moldovan authored
      Newer standard libraries use compiler intrinsics for std::index_sequence
      which makes it ‘free’. This prevents hitting instantiation limits for
      recursive templates (-ftemplate-depth).
      8c85a857
    • Dean Moldovan's avatar
      Accept any sequence type as std::tuple or std::pair · 107285b3
      Dean Moldovan authored
      This is more Pythonic and compliments the std::vector and std::list
      casters which also accept sequences.
      107285b3
    • Dean Moldovan's avatar
      Split up tuple caster and function argument loader · 719c1733
      Dean Moldovan authored
      This is needed in order to allow the tuple caster to accept any sequence
      while keeping the argument loader fast. There is also very little overlap
      between the two classes which makes the separation clean. It’s also good
      practice not to have completely new functionality in a specialization.
      719c1733
  8. 01 Dec, 2016 2 commits
  9. 25 Nov, 2016 3 commits
  10. 24 Nov, 2016 4 commits
  11. 22 Nov, 2016 5 commits
  12. 20 Nov, 2016 6 commits
  13. 17 Nov, 2016 3 commits
    • Wenzel Jakob's avatar
      make arithmetic operators of enum_ optional (#508) · 405f6d1d
      Wenzel Jakob authored
      Following commit 90d278, the object code generated by the python
      bindings of nanogui (github.com/wjakob/nanogui) went up by a whopping
      12%. It turns out that that project has quite a few enums where we don't
      really care about arithmetic operators.
      
      This commit thus partially reverts the effects of #503 by introducing
      an additional attribute py::arithmetic() that must be specified if the
      arithmetic operators are desired.
      405f6d1d
    • Lori A. Burns's avatar
    • Dean Moldovan's avatar
      Improve consistency of array and array_t with regard to other pytypes · 4de27102
      Dean Moldovan authored
      * `array_t(const object &)` now throws on error
      * `array_t::ensure()` is intended for casters —- old constructor is
        deprecated
      * `array` and `array_t` get default constructors (empty array)
      * `array` gets a converting constructor
      * `py::isinstance<array_T<T>>()` checks the type (but not flags)
      
      There is only one special thing which must remain: `array_t` gets
      its own `type_caster` specialization which uses `ensure` instead
      of a simple check.
      4de27102