Skip to content

Commit 595b7eb

Browse files
committed
fix: Prevent resolveCastSource from being instantiated with void type
Add `requires(!std::is_void_v<T>)` constraint to resolveCastSource to reject void type at compile time.
1 parent 63d58f1 commit 595b7eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/jspp/binding/traits/Polymorphic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct ResolvedCastSource {
5151
};
5252

5353
template <typename T>
54+
requires(!std::is_void_v<T>)
5455
ResolvedCastSource resolveCastSource(T* value) {
5556
auto& engine = EngineScope::currentEngineChecked();
5657

0 commit comments

Comments
 (0)