c++ - 尝试使用 bitset 时::reference,编译器抛出错误
问题描述
为什么这段代码会导致编译器错误?
template <size_t N>
class A
{
bitset<N> _bits;
void foo(bitset<N>::reference* ref) // this does not compile
{
//some code
}
};
N != сonsexpr 在这种情况下吗?
错误:C2061 语法错误:标识符“参考”
解决方案
推荐阅读
- python-3.x - 通过 Regex 和 df.str.contains 在单行数据框中查找不同的电子邮件 ID
- javascript - 如何在 mocha / sinon 中测试条件表达式
- c# - 单元测试依赖注入
- ruby-on-rails - 返回空数据时如何处理update_all
- sql - 索引是否会影响向基于 sql 的数据库添加新列?
- sql - 如何根据第一个查询运行第二个查询?
- android - Android Studio 最新版本 3.4.1 未实现任何最新依赖项。?
- sql - 带有 SQL 替换功能的通配符?
- php - 如何避免 Laravel 验证规则中的重复
- java - 如何实现 Spring Boot 控制器以将查询结果返回为 json