boost::shared_ptr<int> p(new std::string); In MS VC++ 6, the above will throw the following compile error:
error C2440: 'initializing' : cannot convert from 'class std::basic_string
*' to 'int *'
The above is not very useful because it catches the error in the shared_ptr.hpp file. However, it is OK because because the compiler also has a reference to my line of code above:
see reference to function template instantiation '__thiscall boost::shared_ptr<int>::boost::shared_ptr<int>(class std::basic_string
*)' being compiled
The above is all good. I however do not get the luxury of the additional reference in MS VC++ 8. Instead I just get the initial reference to shared_ptr.hpp. This makes it extremely difficult to track where the error because I have many pages that use the shared_ptr. - Can anyone suggest how I can get the 2nd reference to my own code in MS VC++ 8. - Am I missing something obvious? - BTW, in vc++ 8 i'm viewing the errors in a list (instead of the text dump). - I may need to look at the text dump to get the 2nd reference but was wondering if there was an easier solution - Sorry, I dont have vc++ 8 in front of me to give you the error