1. 03 Nov, 2016 1 commit
    • Ivan Smirnov's avatar
      std::experimental::optional (#475) · 44a69f78
      Ivan Smirnov authored
      * Add type caster for std::experimental::optional
      
      * Add tests for std::experimental::optional
      
      * Support both <optional> / <experimental/optional>
      
      * Mention std{::experimental,}::optional in the docs
      44a69f78
  2. 01 Nov, 2016 1 commit
    • Dean Moldovan's avatar
      Make reference(_internal) the default return value policy for properties (#473) · 03f627eb
      Dean Moldovan authored
      * Make reference(_internal) the default return value policy for properties
      
      Before this, all `def_property*` functions used `automatic` as their
      default return value policy. This commit makes it so that:
      
       * Non-static properties use `reference_interal` by default, thus
         matching `def_readonly` and `def_readwrite`.
      
       * Static properties use `reference` by default, thus matching
         `def_readonly_static` and `def_readwrite_static`.
      
      In case `cpp_function` is passed to any `def_property*`, its policy will
      be used instead of any defaults. User-defined arguments in `extras`
      still have top priority and will override both the default policies and
      the ones from `cpp_function`.
      
      Resolves #436.
      
      * Almost always use return_value_policy::move for rvalues
      
      For functions which return rvalues or rvalue references, the only viable
      return value policies are `copy` and `move`. `reference(_internal)` and
      `take_ownership` would take the address of a temporary which is always
      an error.
      
      This commit prevents possible user errors by overriding the bad rvalue
      policies with `move`. Besides `move`, only `copy` is allowed, and only
      if it's explicitly selected by the user.
      
      This is also a necessary safety feature to support the new default
      return value policies for properties: `reference(_internal)`.
      03f627eb
  3. 20 Oct, 2016 1 commit
    • Dean Moldovan's avatar
      Support std::shared_ptr holder type out of the box · 5d28dd11
      Dean Moldovan authored
      With this there is no more need for manual user declarations like
      `PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`. Existing ones
      will still compile without error -- they will just be ignored silently.
      
      Resolves #446.
      5d28dd11
  4. 23 Sep, 2016 1 commit
  5. 06 Sep, 2016 1 commit
  6. 24 Aug, 2016 1 commit
  7. 14 Aug, 2016 1 commit
  8. 13 Aug, 2016 1 commit
  9. 12 Jul, 2016 1 commit
  10. 11 Jul, 2016 2 commits
  11. 10 Jul, 2016 1 commit
  12. 22 Jun, 2016 1 commit
  13. 14 Jun, 2016 2 commits
  14. 31 May, 2016 1 commit
  15. 26 May, 2016 1 commit
    • Wenzel Jakob's avatar
      Redesigned virtual call mechanism and user-facing syntax (breaking change!) · 86d825f3
      Wenzel Jakob authored
      Sergey Lyskov pointed out that the trampoline mechanism used to override
      virtual methods from within Python caused unnecessary overheads when
      instantiating the original (i.e. non-extended) class.
      
      This commit removes this inefficiency, but some syntax changes were
      needed to achieve this. Projects using this features will need to make a
      few changes:
      
      In particular, the example below shows the old syntax to instantiate a
      class with a trampoline:
      
      class_<TrampolineClass>("MyClass")
          .alias<MyClass>()
          ....
      
      This is what should be used now:
      
      class_<MyClass, std::unique_ptr<MyClass, TrampolineClass>("MyClass")
          ....
      
      Importantly, the trampoline class is now specified as the *third*
      argument to the class_ template, and the alias<..>() call is gone. The
      second argument with the unique pointer is simply the default holder
      type used by pybind11.
      86d825f3
  16. 17 May, 2016 1 commit
  17. 05 May, 2016 1 commit
  18. 03 May, 2016 1 commit
  19. 30 Apr, 2016 2 commits
  20. 29 Apr, 2016 1 commit
  21. 26 Apr, 2016 1 commit
  22. 25 Apr, 2016 1 commit
  23. 21 Apr, 2016 2 commits
  24. 18 Apr, 2016 1 commit
  25. 15 Apr, 2016 1 commit
  26. 13 Apr, 2016 3 commits
  27. 11 Apr, 2016 1 commit
  28. 07 Apr, 2016 2 commits
  29. 06 Apr, 2016 1 commit
  30. 09 Mar, 2016 1 commit
  31. 08 Mar, 2016 1 commit
  32. 22 Feb, 2016 1 commit
  33. 07 Feb, 2016 1 commit