I'm getting an error with the following:
class Test
{
std::map<std::string,Test> test;
};
The error is "Field has incomplete type 'Test'". I read a few threads with suggested this might be a bug in the version of libcxx which ships with xcode, but it wouldn't surprise me at all if I just have to change it to:
class Test
{
std::map<std::string,std::shared_ptr<Test>> test;
};
I just wanted to double check that this is definitely a correct error and not a bug.
Cheers!
See Question&Answers more detail:os