|
Boost Users : |
From: bringiton bringiton (kneeride_at_[hidden])
Date: 2006-07-24 00:09:38
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<char,struct std::char_traits<char>,class
std::allocator<char> > *' 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<char,struct std::char_traits<char>,class
std::allocator<char> > *)' 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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net