正在解析循环依赖的嵌套类型说明符
Resolving circularly dependant nested type specifiers
很简单,有没有办法让A指代B::value_type,B指代A::value_type?
struct B;
struct A {
using value_type = int;
value_type a;
B::value_type b;
};
struct B {
using value_type = int;
value_type b;
A::value_type a;
};
只是以一种非常粗糙的方式。
template<int> struct Z
{
struct B;
struct A {
using value_type = int;
value_type a;
typename B::value_type b;
};
struct B {
using value_type = int;
value_type b;
typename A::value_type a;
};
};
using A = Z<0>::A;
using B = Z<0>::B;
相关文章:
- 在 CRTP 中使用嵌套名称说明符
- C++预期的嵌套名称说明符
- CRTP:为什么获得嵌套类型和派生类的嵌套方法有区别
- 为什么在VS2015中模板相关的嵌套类型名称中不需要typename关键字?
- 为什么嵌套类型的基类不需要"typename"?
- C++:在嵌套名称说明符中命名的不完整类型
- 使用另一个模板类的嵌套名称说明符专用化模板类
- 在嵌套名称说明符中使用枚举(编译器警告)
- 如何在C++中的另一个模板函数中使用属于模板化类的嵌套类型?
- 保持嵌套类型的挥发性
- 详细说明的类型说明符中的类型相关嵌套名称说明符
- 嵌套名称说明符中使用的类型不完整
- 错误:不完整的类型..在嵌套名称说明符中使用
- 类型名称关键字和嵌套名称说明符
- 正在解析循环依赖的嵌套类型说明符
- 前向声明问题:嵌套名称说明符中使用的类型不完整'enums::Category'
- 嵌套名称说明符中使用的不完整类型,为什么?
- 嵌套名称说明符中的不完整类型
- 嵌套名称说明符中使用的不完整类型'TextureLoader'
- GCC 错误:嵌套名称说明符中使用的类型"claculator"不完整