cuda::experimental::stf::sump::translate_t#

template<class ..._Ts>
struct translate_t#

Boundary translation.

translate<To> replaces every failure by a To built from it; translate<From, To> does so only for a From (catch-clause rules: same or publicly derived) and forwards anything else untouched.

To is a std::exception derivative, constructed from the caught exception when such a constructor exists, from its what() otherwise, default-constructed failing both. The one-type form claims everything, a non-standard exception included, for which To is built from the message “non-standard exception” when it takes a const char*, and default-constructed otherwise. Restrict the source with a selector, as in if_isa<cuda_error>(translate<device_error>). A following | arm sees the To, so translate<low, high> | if_isa<high>(...) ladders compose.