I need to resolve this thing somehow:
class MyType; // this thing doesn't help here
typedef std::stack<boost::variant<int, std::function<shared_ptr<MyType>()>>> MyType;
I get an error like this one
error C2371: 'MyType': redefinition; different basic types
Any help will be appreciate.
Edit:
This can be done easily with using structure as proxy:
struct MyStruct;
typedef std::stack<boost::variant<int, std::function<shared_ptr<MyStruct>()>>> MyType;
struct MyStruct {
MyType data;
};
But must be more handy way to do this.