Click here to Skip to main content
15,915,093 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Difference between ATL and COM Pin
Monty229-Oct-04 2:05
Monty229-Oct-04 2:05 
GeneralRe: Difference between ATL and COM Pin
User 2155971-Nov-04 19:07
User 2155971-Nov-04 19:07 
GeneralSetting checked items in a CTreeViewCtrl Pin
retro_coder28-Oct-04 23:24
retro_coder28-Oct-04 23:24 
GeneralRe: Setting checked items in a CTreeViewCtrl Pin
Jack Puppy16-Nov-04 1:24
Jack Puppy16-Nov-04 1:24 
GeneralRe: Setting checked items in a CTreeViewCtrl Pin
retro_coder16-Nov-04 17:55
retro_coder16-Nov-04 17:55 
GeneralCOM Out-Proc Exe Issue Pin
DeepakSharma28-Oct-04 1:51
DeepakSharma28-Oct-04 1:51 
Generalauto_ptr assignment and VC7 warning Pin
Rob Caldecott28-Oct-04 1:45
Rob Caldecott28-Oct-04 1:45 
GeneralRe: auto_ptr assignment and VC7 warning Pin
Nemanja Trifunovic28-Oct-04 3:13
Nemanja Trifunovic28-Oct-04 3:13 
Welcome to the wonderful world of STL Smile | :)

As for std::auto_ptr, be sure to read this article[^] before using it - its copy semantic is "unusual" and it can cause problems. In fact, I prefer Boost smart pointers in my code - they are safer.

To try to answer your question, I believe you get the warning because the way assigment operator is declared in auto_ptr:

auto_ptr<_Ty>& operator=(auto_ptr<_Ty>& _Right) _THROW0()
	{	// assign compatible _Right (assume pointer)
	reset(_Right.release());
	return (*this);
	}


As you can see, it takes a reference as the argument, not a const reference.



My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
GeneralRe: auto_ptr assignment and VC7 warning Pin
Rob Caldecott28-Oct-04 3:21
Rob Caldecott28-Oct-04 3:21 
GeneralRe: auto_ptr assignment and VC7 warning Pin
Rob Caldecott28-Oct-04 3:59
Rob Caldecott28-Oct-04 3:59 
GeneralRe: auto_ptr assignment and VC7 warning Pin
Nemanja Trifunovic28-Oct-04 5:48
Nemanja Trifunovic28-Oct-04 5:48 
GeneralToolbar for Windows Explorer Pin
iffi99227-Oct-04 23:25
iffi99227-Oct-04 23:25 
Generalvector&lt;HANDLE&gt; to CONST HANDLE *handles Pin
Malcolm Smart27-Oct-04 2:12
Malcolm Smart27-Oct-04 2:12 
GeneralRe: vector&lt;HANDLE&gt; to CONST HANDLE *handles Pin
Nemanja Trifunovic27-Oct-04 2:25
Nemanja Trifunovic27-Oct-04 2:25 
GeneralRe: vector&lt;HANDLE&gt; to CONST HANDLE *handles Pin
Malcolm Smart27-Oct-04 3:11
Malcolm Smart27-Oct-04 3:11 
GeneralWTL child window tabbing order Pin
nemo26-Oct-04 5:03
nemo26-Oct-04 5:03 
GeneralRe: WTL child window tabbing order Pin
Igor Vigdorchik26-Oct-04 14:42
Igor Vigdorchik26-Oct-04 14:42 
GeneralRe: WTL child window tabbing order Pin
Michael Dunn27-Oct-04 7:07
sitebuilderMichael Dunn27-Oct-04 7:07 
GeneralRe: WTL child window tabbing order Pin
Pharago22-Apr-05 1:45
Pharago22-Apr-05 1:45 
Generalcan't locate ATL .h file in Visual Studio Pin
mattroos25-Oct-04 13:27
mattroos25-Oct-04 13:27 
GeneralRe: can't locate ATL .h file in Visual Studio Pin
User 21559725-Oct-04 20:02
User 21559725-Oct-04 20:02 
GeneralRe: can't locate ATL .h file in Visual Studio Pin
mattroos31-Oct-04 13:28
mattroos31-Oct-04 13:28 
GeneralRe: can't locate ATL .h file in Visual Studio Pin
User 21559731-Oct-04 17:30
User 21559731-Oct-04 17:30 
QuestionCListViewCtrl question? Pin
Anonymous21-Oct-04 11:55
Anonymous21-Oct-04 11:55 
AnswerRe: CListViewCtrl question? Pin
Michael Dunn22-Oct-04 13:58
sitebuilderMichael Dunn22-Oct-04 13:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.