Boost logo

Boost Users :

From: Michael Nicolella (boost_at_[hidden])
Date: 2006-07-24 01:14:46


I'm pretty sure you just need to look at the text dump.

 

-----Original Message-----
From: bringiton bringiton [mailto:kneeride_at_[hidden]]
Sent: Sunday, July 23, 2006 9:10 PM
To: boost-users_at_[hidden]
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<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 mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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