admin管理员组文章数量:1287775
std::bad_expected_access is a template class that is thrown. I have code that only cares that any instantiation of it is thrown, not which instantiation. Is there a way to catch (or some other mechanism) all instantiations of a template that are thrown?
std::bad_expected_access is a template class that is thrown. I have code that only cares that any instantiation of it is thrown, not which instantiation. Is there a way to catch (or some other mechanism) all instantiations of a template that are thrown?
Share Improve this question asked Feb 23 at 7:13 GraznarakGraznarak 3,7424 gold badges31 silver badges50 bronze badges1 Answer
Reset to default 2All specializations of std::bad_expected_access inherit from std::bad_expected_access<void>
.
Catch std::bad_expected_access<void>
本文标签: cCatch stdbadexpectedaccessStack Overflow
版权声明:本文标题:c++ - Catch std::bad_expected_access - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741318792a2372080.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论