The following code compiles fine in Visual Studio 2015. In Visual Studio 2022, I get an error "'Foo': identifier not found" inside NestedEdge::Bar
.
Changing Foo();
to BaseEdgeType::Foo();
inside NestedEdge::Bar
solves the issue.
How can I access members of the base class without explicitly specifying the base class in Visual Studio 2022?
class Edge {
public:
auto Foo() const -> void {}
};
template<class BaseEdgeType>
class NestedEdge : public BaseEdgeType {
public:
auto Bar() const -> void {
Foo();
}
};
class MyEdge : public NestedEdge<Edge> {};