1. 31 Dec, 2020 1 commit
  2. 19 Dec, 2020 1 commit
  3. 10 Nov, 2020 1 commit
  4. 16 Oct, 2020 1 commit
  5. 19 Sep, 2020 1 commit
    • David Vo's avatar
      Add enum value to enum repr (#2126) · 5e6ec496
      David Vo authored
      This changes enum reprs to look like `<Enum.name: value>` similarly to
      the Python enum module.
      
      This keeps the str of enums as `Enum.name`, like the Python enum module.
      5e6ec496
  6. 20 Jul, 2020 1 commit
  7. 20 Sep, 2019 2 commits
  8. 19 Sep, 2019 1 commit
  9. 04 Sep, 2019 1 commit
  10. 24 Oct, 2018 1 commit
  11. 11 Sep, 2018 2 commits
    • Wenzel Jakob's avatar
      enum_: move most functionality to a non-template implementation · f4245181
      Wenzel Jakob authored
      This commit addresses an inefficiency in how enums are created in
      pybind11. Most of the enum_<> implementation is completely generic --
      however, being a template class, it ended up instantiating vast amounts
      of essentially identical code in larger projects with many enums.
      
      This commit introduces a generic non-templated helper class that is
      compatible with any kind of enumeration. enum_ then becomes a thin
      wrapper around this new class.
      
      The new enum_<> API is designed to be 100% compatible with the old one.
      f4245181
    • Krzysztof Fornalczyk's avatar
      check for already existing enum value added; added test (#1453) · 5c8746ff
      Krzysztof Fornalczyk authored
      * check for already existing enum value added; added test
      
      * added enum value name to exception message
      
      * test for defining enum with multiple identical names moved to test_enum.cpp/py
      5c8746ff
  12. 07 Apr, 2018 1 commit
    • Boris Staletic's avatar
      Implement an enum_ property "name" · 289e5d9c
      Boris Staletic authored
      The property returns the enum_ value as a string.
      For example:
      
      >>> import module
      >>> module.enum.VALUE
      enum.VALUE
      >>> str(module.enum.VALUE)
      'enum.VALUE'
      >>> module.enum.VALUE.name
      'VALUE'
      
      This is actually the equivalent of Boost.Python "name" property.
      289e5d9c
  13. 16 Nov, 2017 1 commit
  14. 05 Aug, 2017 1 commit
    • Jason Rhinelander's avatar
      Update all remaining tests to new test styles · 391c7544
      Jason Rhinelander authored
      This udpates all the remaining tests to the new test suite code and
      comment styles started in #898.  For the most part, the test coverage
      here is unchanged, with a few minor exceptions as noted below.
      
      - test_constants_and_functions: this adds more overload tests with
        overloads with different number of arguments for more comprehensive
        overload_cast testing.  The test style conversion broke the overload
        tests under MSVC 2015, prompting the additional tests while looking
        for a workaround.
      
      - test_eigen: this dropped the unused functions `get_cm_corners` and
        `get_cm_corners_const`--these same tests were duplicates of the same
        things provided (and used) via ReturnTester methods.
      
      - test_opaque_types: this test had a hidden dependence on ExampleMandA
        which is now fixed by using the global UserType which suffices for the
        relevant test.
      
      - test_methods_and_attributes: this required some additions to UserType
        to make it usable as a replacement for th...
      391c7544
  15. 29 Apr, 2017 2 commits
  16. 03 Mar, 2017 1 commit
  17. 20 Nov, 2016 1 commit
  18. 16 Nov, 2016 1 commit
  19. 19 Aug, 2016 1 commit