"vscode:/vscode.git/clone" did not exist on "e97c735fc44bd39b390a321a276f41b3095ea2fe"
  1. 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
  2. 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
  3. 16 Nov, 2017 1 commit
  4. 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 the test's previous SimpleType:
        UserType gained a value mutator, and the `value` property is not
        mutable (it was previously readonly).  Some overload tests were also
        added to better test overload_cast (as described above).
      
      - test_numpy_array: removed the untemplated mutate_data/mutate_data_t:
        the templated versions with an empty parameter pack expand to the same
        thing.
      
      - test_stl: this was already mostly in the new style; this just tweaks
        things a bit, localizing a class, and adding some missing
        `// test_whatever` comments.
      
      - test_virtual_functions: like `test_stl`, this was mostly in the new
        test style already, but needed some `// test_whatever` comments.
        This commit also moves the inherited virtual example code to the end
        of the file, after the main set of tests (since it is less important
        than the other tests, and rather length); it also got renamed to
        `test_inherited_virtuals` (from `test_inheriting_repeat`) because it
        tests both inherited virtual approaches, not just the repeat approach.
      391c7544
  5. 29 Apr, 2017 2 commits
  6. 03 Mar, 2017 1 commit
  7. 20 Nov, 2016 1 commit
  8. 16 Nov, 2016 1 commit
  9. 19 Aug, 2016 1 commit