shared_ptr compile error ms vc++ 8
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
I'm pretty sure you just need to look at the text dump. -----Original Message----- From: bringiton bringiton [mailto:kneeride@gmail.com] Sent: Sunday, July 23, 2006 9:10 PM To: boost-users@lists.boost.org Subject: [Boost-users] shared_ptr compile error ms vc++ 8 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 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ok thanks.
I have pages of warnings. Probably time to cleanup the code ;)
On 7/24/06, Michael Nicolella
I'm pretty sure you just need to look at the text dump.
-----Original Message----- From: bringiton bringiton [mailto:kneeride@gmail.com] Sent: Sunday, July 23, 2006 9:10 PM To: boost-users@lists.boost.org Subject: [Boost-users] shared_ptr compile error ms vc++ 8
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 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
bringiton bringiton
-
Michael Nicolella