c++ - 在 c++ 20 中删除了 throw 函数。你现在如何抛出异常?
问题描述
更新代码时,我找不到任何关于throw
用 c++ 替换 a 的内容。throw
在下一个版本c++20中将删除seeing 。
它也被弃用了,我找不到关于接受的替代品是什么的信息。例子:
const Vec2 & normalize (); // modifies *this
const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
const Vec2 & normalizeNonNull ();
Vec2<T> normalized () const; // does not modify *this
Vec2<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
Vec2<T> normalizedNonNull () const;
解决方案
推荐阅读
- google-apps-script - 从模板创建工作表后设置目标文件夹
- php - MySQL - phpmyadmin 警报消息
- python - 有没有办法在 seaborn 中获得特定数量的地块?
- hibernate - 我应该如何在具有复合主键的实体中覆盖 equals/hashCode?
- google-sheets - Google 表格 googlefinance 查询在 if 语句中不起作用
- r - 我可以使用 mapply 拟合不同的回归模型吗?
- sql - 数据字段 - 在新数据字段中搜索和写入值 (Oracle)
- javascript - ESLint 规则确保 JSX 文本节点不与其他节点混合
- c# - 绑定 TabItem 模板
- boto3 - Boto3 忽略 AWS_CONTAINER_CREDENTIALS_RELATIVE_URI