1. Aug 13, 2016
  2. Aug 12, 2016
    • Wenzel Jakob's avatar
      Merge pull request #282 from jagerman/key-iterators · 09f40e01
      Wenzel Jakob authored
      Add pybind11::make_key_iterator for map iteration
      09f40e01
    • Jason Rhinelander's avatar
      Added pybind11::make_key_iterator for map iteration · 5aa85be2
      Jason Rhinelander authored
      This allows exposing a dict-like interface to python code, allowing
      iteration over keys via:
      
          for k in custommapping:
              ...
      
      while still allowing iteration over pairs, so that you can also
      implement 'dict.items()' functionality which returns a pair iterator,
      allowing:
      
          for k, v in custommapping.items():
              ...
      
      example-sequences-and-iterators is updated with a custom class providing
      both types of iteration.
      5aa85be2
    • Wenzel Jakob's avatar
      quench warning on clang/OSX · 216df0dd
      Wenzel Jakob authored
      216df0dd
    • Wenzel Jakob's avatar
      add Jason Rhinelander to contributors list · bb6c1f9c
      Wenzel Jakob authored
      bb6c1f9c
    • Wenzel Jakob's avatar
      Merge pull request #324 from jagerman/example-constructor-tracking · f4f2afb6
      Wenzel Jakob authored
      Improve constructor/destructor tracking
      f4f2afb6
    • Jason Rhinelander's avatar
      Improve constructor/destructor tracking · 3f589379
      Jason Rhinelander authored
      This commit rewrites the examples that look for constructor/destructor
      calls to do so via static variable tracking rather than output parsing.
      
      The added ConstructorStats class provides methods to keep track of
      constructors and destructors, number of default/copy/move constructors,
      and number of copy/move assignments.  It also provides a mechanism for
      storing values (e.g. for value construction), and then allows all of
      this to be checked at the end of a test by getting the statistics for a
      C++ (or python mapping) class.
      
      By not relying on the precise pattern of constructions/destructions,
      but rather simply ensuring that every construction is matched with a
      destruction on the same object, we ensure that everything that gets
      created also gets destroyed as expected.
      
      This replaces all of the various "std::cout << whatever" code in
      constructors/destructors with
      `print_created(this)`/`print_destroyed(this)`/etc. functions which
      provide similar output, but now has a unifi...
      3f589379
    • Wenzel Jakob's avatar
      Merge pull request #330 from jagerman/silence-msvc-warning · 85557b1d
      Wenzel Jakob authored
      Silence MSVC warning
      85557b1d
    • Jason Rhinelander's avatar
      Silence MSVC warning · e20fc61a
      Jason Rhinelander authored
      PR #329 generates the following warning under MSVC:
      
          ...\cast.h(202): warning C4456: declaration of 'it' hides previous local declaration
      
      This renames the second iterator to silence it.
      e20fc61a