Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 10, 2024
1 parent e55e864 commit badb28d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1565,16 +1565,14 @@ struct function_call {
};

// See PR #5396 for the discussion that led to this
template<typename Base, typename Derived, typename = void>
template <typename Base, typename Derived, typename = void>
struct is_same_or_base_of : std::is_same<Base, Derived> {};

// Only evaluate is_base_of if Derived is complete.
// It will raise a compiler error if Derived is not complete.
template<typename Base, typename Derived>
struct is_same_or_base_of<Base, Derived, decltype(void(sizeof(Derived)))> : any_of<
std::is_same<Base, Derived>,
std::is_base_of<Base, Derived>
> {};
template <typename Base, typename Derived>
struct is_same_or_base_of<Base, Derived, decltype(void(sizeof(Derived)))>
: any_of<std::is_same<Base, Derived>, std::is_base_of<Base, Derived>> {};

/// Helper class which loads arguments for C++ functions called from Python
template <typename... Args>
Expand Down

0 comments on commit badb28d

Please sign in to comment.