Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CAdapt and my current experience

20 views
Skip to first unread message

ross...@hotmail.com

unread,
Nov 8, 2004, 7:50:10 PM11/8/04
to

Hi all,

I am using STL in containers like:

std::vector< CComBSTR >
std::vector< CComPtr >
std::map< CComBSTR, CComPtr >
and so on

Until now I have not reach any problems with that. But I have read
recently on this list that I have to use "CAdapt", when I want to store
spart pointers in STL containers. But as I said, I have not had any
problems yet.

So my question is: Am I have to use "CAdapt" when storing smart pointers
after all. Right now I only store\search for items in the containers.

Cheers

--
Rossen Tzonev
Sofia, Bulgaria

Igor Tandetnik

unread,
Nov 8, 2004, 8:23:27 PM11/8/04
to
<ross...@hotmail.com> wrote in message
news:opsg59xwgs4kmqjl@rossenbg-homepc

According to the C++ standard, you must use CAdapt with classes that
overload operator& (both CComPtr and CComBSTR do). Depending on the
implementation and the exact container you use, you are more or less
likely to run into problems in practice. For examples of such problems,
see

http://groups.yahoo.com/group/wtl/message/10154

You may want to browse through the whole thread here:

http://groups.yahoo.com/group/wtl/message/10150

--
With best wishes,
Igor Tandetnik

"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage


0 new messages