cuda::experimental::stf::sump::if_monomorphic#

template<class ..._Es, class _P>
auto cuda::experimental::stf::sump::if_monomorphic(
_P &&__p
)#

Restricts a policy to exceptions whose dynamic type is exactly one of E1, E2, ...: monomorphic where if_isa is polymorphic, so a handler accepts a type without inheriting its cone.

if_monomorphic<std::bad_alloc>(p) handles allocation pressure yet lets std::bad_array_new_length, a size-computation bug, fly on; value operations that would slice under a cone (copy, store) are safe behind an exact gate; and the guard’s contract cannot drift when someone derives a new type later. Matching reads the dynamic type through the std::exception funnel, so every listed type must derive std::exception, and a non-std active exception always forwards. Duplicates are rejected; Base and Derived may both be listed, each matching only itself. In | chains, if_monomorphic<E>(recover) | if_isa<E>(fallback) layers the exact type against the rest of its cone; the reverse order starves the exact arm and is a compile error.