pybind11/include
Laramie Leavitt 088ad4f298
Cleanup cast_safe<void> specialization (#3861)
* Cleanup cast_safe<void> specialization

Replace explicit specialization of cast_safe<void> with SFINAE.
It's better for SFINAE cases to cover all type-sets rather than mixing SFINAE and explicit specialization.

Extracted from #3674

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update cast.h

Use detail::none_of<> as suggested

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update cast.h

Reorder:
If TEMP_REF
If VOID
if (!VOID && !TEMP_REF)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-11 11:57:05 -07:00
..
pybind11 Cleanup cast_safe<void> specialization (#3861) 2022-04-11 11:57:05 -07:00